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

Function centroidLinePoint

external/.d3.js:10245–10257  ·  view source on GitHub ↗
(lambda, phi)

Source from the content-addressed store, hash-verified

10243}
10244
10245function centroidLinePoint(lambda, phi) {
10246 lambda *= radians, phi *= radians;
10247 var cosPhi = cos$1(phi),
10248 x = cosPhi * cos$1(lambda),
10249 y = cosPhi * sin$1(lambda),
10250 z = sin$1(phi),
10251 w = atan2$1(sqrt$2((w = y0$4 * z - z0 * y) * w + (w = z0 * x - x0$4 * z) * w + (w = x0$4 * y - y0$4 * x) * w), x0$4 * x + y0$4 * y + z0 * z);
10252 W1 += w;
10253 X1$1 += w * (x0$4 + (x0$4 = x));
10254 Y1$1 += w * (y0$4 + (y0$4 = y));
10255 Z1$1 += w * (z0 + (z0 = z));
10256 centroidPointCartesian(x0$4, y0$4, z0);
10257}
10258
10259function centroidLineEnd$1() {
10260 centroidStream$1.point = centroidPoint$1;

Callers

nothing calls this directly

Calls 1

centroidPointCartesianFunction · 0.85

Tested by

no test coverage detected