1.0.1 • Published 4 years ago
compass-bearing v1.0.1
compass-bearing
Get the relative compass bearing of a set of coordinates from another set.
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
.