Package Exports
- polygons-intersect
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 (polygons-intersect) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
polygons-intersect
This script finds all points where the polygons intersect each other.
Install
npm install polygons-intersect
Usage
var polygonsIntersect = require('polygons-intersect');
var poly1 = [{x: 10, y: 10}, {x: 10, y: 30}, {x: 30, y: 30}, {x: 30, y: 10}];
var poly2 = [{x: 20, y: 20}, {x: 20, y: 40}, {x: 40, y: 40}, {x: 40, y: 20}];
console.log(polygonsIntersect(poly1, poly2));
License
MIT