DefinitelyTyped/types/robust-point-in-polygon/robust-point-in-polygon-tests.ts
mb 8eaac71fb2 create types for robust-point-in-polygon (#34526)
* create types for robust-point-in-polygon

* fix errors in index and test

* fix travis build issues

* declare point type in test
2019-05-30 12:17:55 -07:00

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);