angle-between-points
v1.0.0
Published
given two points, it returns the angle in degrees from one to the other
Downloads
35
Maintainers
Readme
angle-between-points
Given two points, it returns the angle in degrees from one to the other.
EXAMPLE
angleBetweenPoints(point1, point2)
var angleBetweenPoints = require('angle-between-points');
angleBetweenPoints( {x: 1, y: 1}, {x: 4, y: 4} );
// returns 45
angleBetweenPoints( {x: 2, y: 2}, {x: -4, y: -4} );
// returns 225
angleBetweenPoints( {x: 2, y: 0}, {x: -4, y: 0} );
// returns 180
LICENSE
MIT