compass-bearing
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

compass-bearing Travis CI Build Status

Get the relative compass bearing of a set of coordinates from another set.

NPM Badge

Install

npm install compass-bearing

Usage

const compassBearing = require("compass-bearing")

compassBearing([10, 10], [20, 20])
//=> 45

API

compassBearing([startX, startY], [endX, endY])

startX, startY, endX, endY

Type: number

The starting and ending coordinates to get the relative bearing from. Returns a degree from 0 up to (but excluding) 360.

Package Sidebar

Install

npm i compass-bearing

Weekly Downloads

1

Version

1.0.1

License

MIT

Unpacked Size

3.89 kB

Total Files

6

Last publish

Collaborators

  • richienb