is-polygon
v1.0.6
Published
Determine if the polygon is legal
Readme
import { isPolygon } from 'is-polygon'
let points = [{x:x1,y:y1},{x:x2,y:y2},{x:x3,x:y3}]
let result = isPolygon(points)
//if legal polygon
console.log(result) // true
// illegal polygon
console.log(result) // false