Newton's Principia Mathematica

    angle-between-points

    1.0.0 • Public • Published

    angle-between-points

    Given two points, it returns the angle in degrees from one to the other.

    NPM

    build status

    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

    Install

    npm i angle-between-points

    DownloadsWeekly Downloads

    9

    Version

    1.0.0

    License

    MIT

    Last publish

    Collaborators

    • willhoag