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

Function centroidPointRing

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

Source from the content-addressed store, hash-verified

133603 centroidPoint(x00 = x0 = x, y00 = y0 = y);
133604}
133605function centroidPointRing(x, y) {
133606 var dx = x - x0, dy = y - y0, z = (0, _mathJs.sqrt)(dx * dx + dy * dy);
133607 X1 += z * (x0 + x) / 2;
133608 Y1 += z * (y0 + y) / 2;
133609 Z1 += z;
133610 z = y0 * x - x0 * y;
133611 X2 += z * (x0 + x);
133612 Y2 += z * (y0 + y);
133613 Z2 += z * 3;
133614 centroidPoint(x0 = x, y0 = y);
133615}
133616exports.default = centroidStream;
133617
133618},{"../math.js":"cDOGy","@parcel/transformer-js/src/esmodule-helpers.js":"jA2du"}],"kTiUD":[function(require,module,exports) {

Callers 1

centroidRingEndFunction · 0.70

Calls 1

centroidPointFunction · 0.70

Tested by

no test coverage detected