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

Function lengthPoint

docs/tests/v2/es6/js/sanddance.js:115401–115413  ·  view source on GitHub ↗
(lambda, phi)

Source from the content-addressed store, hash-verified

115399}
115400
115401function lengthPoint(lambda, phi) {
115402 lambda *= _math.radians, phi *= _math.radians;
115403 var sinPhi = (0, _math.sin)(phi),
115404 cosPhi = (0, _math.cos)(phi),
115405 delta = (0, _math.abs)(lambda - lambda0),
115406 cosDelta = (0, _math.cos)(delta),
115407 sinDelta = (0, _math.sin)(delta),
115408 x = cosPhi * sinDelta,
115409 y = cosPhi0 * sinPhi - sinPhi0 * cosPhi * cosDelta,
115410 z = sinPhi0 * sinPhi + cosPhi0 * cosPhi * cosDelta;
115411 lengthSum.add((0, _math.atan2)((0, _math.sqrt)(x * x + y * y), z));
115412 lambda0 = lambda, sinPhi0 = sinPhi, cosPhi0 = cosPhi;
115413}
115414
115415function _default(object) {
115416 lengthSum.reset();

Callers 1

sanddance.jsFile · 0.70

Calls 1

addMethod · 0.45

Tested by

no test coverage detected