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

Function transformPolygon

docs/app/js/sanddance-app.js:130768–130770  ·  view source on GitHub ↗
(coordinates)

Source from the content-addressed store, hash-verified

130766function transform(grid, sx, sy, tx, ty) {
130767 const x1 = grid.x1 || 0, y1 = grid.y1 || 0, flip = sx * sy < 0;
130768 function transformPolygon(coordinates) {
130769 coordinates.forEach(transformRing);
130770 }
130771 function transformRing(coordinates) {
130772 if (flip) coordinates.reverse(); // maintain winding order
130773 coordinates.forEach(transformPoint);

Callers

nothing calls this directly

Calls 1

forEachMethod · 0.45

Tested by

no test coverage detected