Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

angle-deviation-from-north

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

angle-deviation-from-north

Determines the clockwise angle deviation from the North direction

  • 1.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

angle-deviation-from-north

Greenkeeper badge

Determines the clockwise angle deviation from the North direction.

The implementation uses the Rhumb line algorithm which is efficient and accurate for short distances.

Install

$ npm install --save angle-deviation-from-north

Usage

const determineAngleDeviationFromNorth = require('angle-deviation-from-north');

const from = { latitude: 59.45337, longitude: 18.5579 };
const to = { latitude: 59.45337, longitude: 18.5569 };

determineAngleDeviationFromNorth(from, to);
//=> 270

API

determineAngleDeviationFromNorth(fromPosition, toPosition)

Gives the heading of the line from one position to another.

For example, if you draw an arrow from fromPosition to toPosition then the arrow will have the heading returned by this function.

The returned angle is in degrees and can be [0.0, 360.0), greater than or equal 0 and less than 360.

The two positions must have the properties latitude and longitude.

Keywords

FAQs

Package last updated on 12 Feb 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc