MCPcopy
hub / github.com/microsoft/SandDance / line

Function line

docs/app/js/sanddance-app.js:109482–109487  ·  view source on GitHub ↗
(arcs)

Source from the content-addressed store, hash-verified

109480 return transformPoint(p);
109481 }
109482 function line(arcs) {
109483 var points = [];
109484 for(var i = 0, n = arcs.length; i < n; ++i)arc(arcs[i], points);
109485 if (points.length < 2) points.push(points[0]); // This should never happen per the specification.
109486 return points;
109487 }
109488 function ring(arcs) {
109489 var points = line(arcs);
109490 while(points.length < 4)points.push(points[0]); // This may happen if an arc has only two points.

Callers 4

ringFunction · 0.70
geometryFunction · 0.70
polygonFunction · 0.70
lineRFunction · 0.70

Calls 5

arcFunction · 0.70
curveFunction · 0.70
xFunction · 0.70
yFunction · 0.70
forEachMethod · 0.45

Tested by

no test coverage detected