Package Exports
- polygon-direction
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (polygon-direction) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Polygon Direction
Determine if a polygon is clockwise or counter-clockwise
Install
npm install polygon-direction
Methods
var polydir = require("point-in-polygon");
polydir(polygon)
Returns true
if a polygon is clockwise, false
if it it counter-clockwise.
polygon
should be an array of 2-item arrays of coordinates.
Example
var polydir = require("polygon-direction");
console.log(polydir([[5,0],[6,4],[4,5],[1,5],[1,0]]));