Skip to content

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

License

Notifications You must be signed in to change notification settings

satyarohith/cardinal

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cardinal

ci

16-point compass rose

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

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

MIT License.