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

Function centroidPoint

docs/app/js/sanddance-app.js:132302–132306  ·  view source on GitHub ↗
(lambda, phi)

Source from the content-addressed store, hash-verified

132300};
132301// Arithmetic mean of Cartesian vectors.
132302function centroidPoint(lambda, phi) {
132303 lambda *= (0, _mathJs.radians), phi *= (0, _mathJs.radians);
132304 var cosPhi = (0, _mathJs.cos)(phi);
132305 centroidPointCartesian(cosPhi * (0, _mathJs.cos)(lambda), cosPhi * (0, _mathJs.sin)(lambda), (0, _mathJs.sin)(phi));
132306}
132307function centroidPointCartesian(x, y, z) {
132308 ++W0;
132309 X0 += (x - X0) / W0;

Callers 4

centroidPointFirstLineFunction · 0.70
centroidPointLineFunction · 0.70
centroidPointFirstRingFunction · 0.70
centroidPointRingFunction · 0.70

Calls 1

centroidPointCartesianFunction · 0.70

Tested by

no test coverage detected