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

Function copyNestedRing

docs/app/js/sanddance-app.js:103696–103702  ·  view source on GitHub ↗
(target, targetStartIndex, simplePolygon, size)

Source from the content-addressed store, hash-verified

103694 return true;
103695}
103696function copyNestedRing(target, targetStartIndex, simplePolygon, size) {
103697 var targetIndex = targetStartIndex;
103698 var len = simplePolygon.length;
103699 for(var i = 0; i < len; i++)for(var j = 0; j < size; j++)target[targetIndex++] = simplePolygon[i][j] || 0;
103700 if (!isNestedRingClosed(simplePolygon)) for(var _j = 0; _j < size; _j++)target[targetIndex++] = simplePolygon[0][_j] || 0;
103701 return targetIndex;
103702}
103703function copyFlatRing(target, targetStartIndex, positions, size) {
103704 var srcStartIndex = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 0;
103705 var srcEndIndex = arguments.length > 5 ? arguments[5] : undefined;

Callers 1

normalizeFunction · 0.70

Calls 1

isNestedRingClosedFunction · 0.70

Tested by

no test coverage detected