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

Function centroidPointLine

docs/app/js/sanddance-app.js:133585–133591  ·  view source on GitHub ↗
(x, y)

Source from the content-addressed store, hash-verified

133583 centroidPoint(x0 = x, y0 = y);
133584}
133585function centroidPointLine(x, y) {
133586 var dx = x - x0, dy = y - y0, z = (0, _mathJs.sqrt)(dx * dx + dy * dy);
133587 X1 += z * (x0 + x) / 2;
133588 Y1 += z * (y0 + y) / 2;
133589 Z1 += z;
133590 centroidPoint(x0 = x, y0 = y);
133591}
133592function centroidLineEnd() {
133593 centroidStream.point = centroidPoint;
133594}

Callers

nothing calls this directly

Calls 1

centroidPointFunction · 0.70

Tested by

no test coverage detected