Sha256: 9cbeb30d1d9a0d7fad85b131124ee49be3b0adb3f0ebfe2259e71e7a231607c4
Contents?: true
Size: 438 Bytes
Versions: 4
Compression:
Stored size: 438 Bytes
Contents
function craster(λ, φ) { var sqrt3 = Math.sqrt(3); return [ sqrt3 * λ * (2 * Math.cos(2 * φ / 3) - 1) / sqrtπ, sqrt3 * sqrtπ * Math.sin(φ / 3) ]; } craster.invert = function(x, y) { var sqrt3 = Math.sqrt(3), φ = 3 * asin(y / (sqrt3 * sqrtπ)); return [ sqrtπ * x / (sqrt3 * (2 * Math.cos(2 * φ / 3) - 1)), φ ]; }; (d3.geo.craster = function() { return projection(craster); }).raw = craster;
Version data entries
4 entries across 4 versions & 1 rubygems