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

Function longitude

docs/app/js/sanddance-app.js:132871–132874  ·  view source on GitHub ↗
(point)

Source from the content-addressed store, hash-verified

132869var _cartesianJs = require("./cartesian.js");
132870var _mathJs = require("./math.js");
132871function longitude(point) {
132872 if ((0, _mathJs.abs)(point[0]) <= (0, _mathJs.pi)) return point[0];
132873 else return (0, _mathJs.sign)(point[0]) * (((0, _mathJs.abs)(point[0]) + (0, _mathJs.pi)) % (0, _mathJs.tau) - (0, _mathJs.pi));
132874}
132875exports.default = function(polygon, point) {
132876 var lambda = longitude(point), phi = point[1], sinPhi = (0, _mathJs.sin)(phi), normal = [
132877 (0, _mathJs.sin)(lambda),

Callers 1

sanddance-app.jsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected