https://github.com/ioinitid/degreezzy
"Degreezzy" - library for converting degrees and directions.
https://github.com/ioinitid/degreezzy
degrees directions javascript npm typescript
Last synced: 8 months ago
JSON representation
"Degreezzy" - library for converting degrees and directions.
- Host: GitHub
- URL: https://github.com/ioinitid/degreezzy
- Owner: IOINITID
- License: mit
- Created: 2020-11-24T09:14:04.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2021-12-04T14:49:30.000Z (almost 4 years ago)
- Last Synced: 2025-02-11T13:47:33.436Z (8 months ago)
- Topics: degrees, directions, javascript, npm, typescript
- Language: TypeScript
- Homepage:
- Size: 188 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- Changelog: changelog.md
- Contributing: contributing.md
- License: license.md
Awesome Lists containing this project
README

[](https://badge.fury.io/js/degreezzy)


[](https://github.com/IOINITID/degreezzy/actions/workflows/build-action.yml)
[](https://codecov.io/gh/IOINITID/degreezzy)## What is it? 🐱
It is a library with utilitarian functions for working with degrees and directions.
## How to use it?
First you need to install the package from npm:
```
npm install --save degreezzy
```After that, you need to import the package into your project:
```
import { getDirectionByDegrees, getDegreesByDirection } from 'degreezzy';
```Now you can use this in your project, for example:
```
const degrees = 360; // Degrees value.const direction = getDirectionByDegrees(degrees); // Returns a direction value: 'N';
```You can also:
```
const direction = 'N'; // Direction value.const degrees = getDegreesByDirection(direction); // Returns a degrees value: 360;
```There are also functions for converting radians to degrees.
```
import { getDegreesByRadians, getRadiansByDegrees } from 'degreezzy';
```Which you can use that way.
```
const radians = 6.283185307179586; // Radians value.
const degrees = getDegreesByRadians(radians); // Returns a degrees value: 360.
```Or degrees to radians.
```
const degrees = 360; // Degrees value.
const radians = getRadiansByDegrees(degrees); // Returns a radians value: 6.283185307179586.
```## Thanks for using this library.
If you have any suggestions or improvements, we are always open to the Pull Requests. If you liked it, you can put a star on the GitHub, thanks!