MCPcopy
hub / github.com/csev/py4e / forward

Function forward

code/gmane/d3.v3.js:3842–3845  ·  view source on GitHub ↗
(λ, φ)

Source from the content-addressed store, hash-verified

3840 function d3_geo_conicEqualArea(φ0, φ1) {
3841 var sinφ0 = Math.sin(φ0), n = (sinφ0 + Math.sin(φ1)) / 2, C = 1 + sinφ0 * (2 * n - sinφ0), ρ0 = Math.sqrt(C) / n;
3842 function forward(λ, φ) {
3843 var ρ = Math.sqrt(C - 2 * n * Math.sin(φ)) / n;
3844 return [ ρ * Math.sin(λ *= n), ρ0 - ρ * Math.cos(λ) ];
3845 }
3846 forward.invert = function(x, y) {
3847 var ρ0_y = ρ0 - y;
3848 return [ Math.atan2(x, ρ0_y) / n, d3_asin((C - (x * x + ρ0_y * ρ0_y) * n * n) / (2 * n)) ];

Callers

nothing calls this directly

Calls 1

tFunction · 0.70

Tested by

no test coverage detected