Sha256: d632af8983a5025fbd2881c7db6c0e194cd6f5beb9a2dc408b0dd29c13bb3bf5
Contents?: true
Size: 805 Bytes
Versions: 4
Compression:
Stored size: 805 Bytes
Contents
function hatano(λ, φ) { var c = Math.sin(φ) * (φ < 0 ? 2.43763 : 2.67595); for (var i = 0, δ; i < 20; i++) { φ -= δ = (φ + Math.sin(φ) - c) / (1 + Math.cos(φ)); if (Math.abs(δ) < ε) break; } return [ .85 * λ * Math.cos(φ *= .5), Math.sin(φ) * (φ < 0 ? 1.93052 : 1.75859) ]; } hatano.invert = function(x, y) { var θ = Math.abs(θ = y * (y < 0 ? .51799515156538134803 : .56863737426006061674)) > 1 - ε ? θ > 0 ? π / 2 : -π / 2 : asin(θ); return [ 1.17647058823529411764 * x / Math.cos(θ), Math.abs(θ = ((θ += θ) + Math.sin(θ)) * (y < 0 ? .41023453108141924738 : .37369906014686373063)) > 1 - ε ? θ > 0 ? π / 2 : -π / 2 : asin(θ) ]; }; (d3.geo.hatano = function() { return projection(hatano); }).raw = hatano;
Version data entries
4 entries across 4 versions & 1 rubygems