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

Function modifyPolygonWindingDirectionPoints

docs/app/js/sanddance-app.js:101669–101676  ·  view source on GitHub ↗
(points, direction, options = {})

Source from the content-addressed store, hash-verified

101667 }
101668}
101669function modifyPolygonWindingDirectionPoints(points, direction, options = {}) {
101670 const currentDirection = getPolygonWindingDirectionPoints(points, options);
101671 if (currentDirection !== direction) {
101672 points.reverse();
101673 return true;
101674 }
101675 return false;
101676}
101677function getPolygonWindingDirectionPoints(points, options = {}) {
101678 return Math.sign(getPolygonSignedAreaPoints(points, options));
101679}

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected