MCPcopy Create free account
hub / github.com/microsoft/SandDance / validate

Function validate

docs/app/js/sanddance-app.js:103678–103681  ·  view source on GitHub ↗
(polygon)

Source from the content-addressed store, hash-verified

103676 return arr2;
103677}
103678function validate(polygon) {
103679 polygon = polygon && polygon.positions || polygon;
103680 if (!Array.isArray(polygon) && !ArrayBuffer.isView(polygon)) throw new Error("invalid polygon");
103681}
103682function isSimple(polygon) {
103683 return polygon.length >= 1 && polygon[0].length >= 2 && Number.isFinite(polygon[0][0]);
103684}

Callers 2

validatePropsFunction · 0.70
normalizeFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected