Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/satyarohith/cardinal

A Deno module to get compass direction (16 directions) from degree.
https://github.com/satyarohith/cardinal

cardinal compass deno module wind-direction

Last synced: 12 days ago
JSON representation

A Deno module to get compass direction (16 directions) from degree.

Awesome Lists containing this project

README

        

# Cardinal

![ci](https://github.com/satyarohith/cardinal/actions/workflows/ci.yml/badge.svg)


16-point compass rose

Get direction for the provided degree based on a 16-point compass rose.

```ts
import { getDirection } from "https://deno.land/x/cardinal/mod.ts";
console.log(getDirection(135)); // SE
console.log(getDirection(135, { long: true })); // southeast
```

[MIT](LICENSE) License.