MCPcopy Create free account
hub / github.com/breck7/scroll / centroidPointRing

Function centroidPointRing

external/.d3.js:11774–11788  ·  view source on GitHub ↗
(x, y)

Source from the content-addressed store, hash-verified

11772}
11773
11774function centroidPointRing(x, y) {
11775 var dx = x - x0$1,
11776 dy = y - y0$1,
11777 z = sqrt$2(dx * dx + dy * dy);
11778
11779 X1 += z * (x0$1 + x) / 2;
11780 Y1 += z * (y0$1 + y) / 2;
11781 Z1 += z;
11782
11783 z = y0$1 * x - x0$1 * y;
11784 X2 += z * (x0$1 + x);
11785 Y2 += z * (y0$1 + y);
11786 Z2 += z * 3;
11787 centroidPoint(x0$1 = x, y0$1 = y);
11788}
11789
11790var pathCentroid = centroidStream;
11791

Callers 1

centroidRingEndFunction · 0.85

Calls 1

centroidPointFunction · 0.85

Tested by

no test coverage detected