ts-polygons-intersect
v2.0.2
Published
This script finds all points where the polygons intersect each other. This repository is a fork from DudaGod/polygons-intersect's package, traduced in typescript and fixed from minor bugs.
Downloads
3
Maintainers
Readme
ts-polygons-intersect
This script finds all points where the polygons intersect each other.
Install
npm install ts-polygons-intersect
Usage
import {Polygon, intersection} from 'ts-polygons-intersect';
const poly1 = Polygon.fromJson([{x:0,y:1}, ...]);
const poly1 = Polygon.fromJson([{x:1,y:0}, ...]);
const intersection = intersection(poly1, poly2);
License
MIT