MCPcopy Create free account
hub / github.com/jipegit/OSXAuditor / forward

Function forward

d3-3.2.8/d3.js:3073–3076  ·  view source on GitHub ↗
(λ, φ)

Source from the content-addressed store, hash-verified

3071 function d3_geo_conicEqualArea(φ0, φ1) {
3072 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;
3073 function forward(λ, φ) {
3074 var ρ = Math.sqrt(C - 2 * n * Math.sin(φ)) / n;
3075 return [ ρ * Math.sin(λ *= n), ρ0 - ρ * Math.cos(λ) ];
3076 }
3077 forward.invert = function(x, y) {
3078 var ρ0_y = ρ0 - y;
3079 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