Sha256: c626420bbeaecdc45c1c46cc9bc9f1d005e4753fca1ae6c737d404e8b77e69d4

Contents?: true

Size: 388 Bytes

Versions: 4

Compression:

Stored size: 388 Bytes

Contents

import "projection";

function eckert1(λ, φ) {
  var α = Math.sqrt(8 / (3 * π));
  return [
    α * λ * (1 - Math.abs(φ) / π),
    α * φ
  ];
}

eckert1.invert = function(x, y) {
  var α = Math.sqrt(8 / (3 * π)),
      φ = y / α;
  return [
    x / (α * (1 - Math.abs(φ) / π)),
    φ
  ];
};

(d3.geo.eckert1 = function() { return projection(eckert1); }).raw = eckert1;

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
d3js-plugins-rails-0.0.8 vendor/assets/javascripts/d3/plugins/geo/projection/eckert1.js
d3js-plugins-rails-0.0.7 vendor/assets/javascripts/d3/plugins/geo/projection/eckert1.js
d3js-plugins-rails-0.0.6 vendor/assets/javascripts/d3/plugins/geo/projection/eckert1.js
d3js-plugins-rails-0.0.5 vendor/assets/javascripts/d3/plugins/geo/projection/eckert1.js