mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
* create types for robust-point-in-polygon * fix errors in index and test * fix travis build issues * declare point type in test
9 lines
242 B
TypeScript
9 lines
242 B
TypeScript
import robustPointInPolygon = require('robust-point-in-polygon');
|
|
|
|
type Point = [number, number];
|
|
|
|
const polygon: Point[] = [ [ 1, 1 ], [ 1, 2 ], [ 2, 2 ], [ 2, 1 ] ];
|
|
const point: Point = [ 1.5, 1.5 ];
|
|
|
|
robustPointInPolygon(polygon, point);
|