UNPKG

node-red-contrib-tak-registration

Version:

A Node-RED node to register to TAK and to help wrap files as datapackages to send to TAK

7 lines (5 loc) 277 B
var pointInPolygon = require('../'); var polygon = [ [ 1, 1 ], [ 1, 2 ], [ 2, 2 ], [ 2, 1 ] ]; console.log(pointInPolygon([ 1.5, 1.5 ], polygon)); // true console.log(pointInPolygon([ 4.9, 1.2 ], polygon)); // false console.log(pointInPolygon([ 1.8, 1.1 ], polygon)); // true