Sha256: ee51efc3237f5c75d7d87235f09465efe4a292b97bad5497f5024d94ae648976

Contents?: true

Size: 412 Bytes

Versions: 4

Compression:

Stored size: 412 Bytes

Contents

import "projection";

function times(λ, φ) {
  var t = Math.tan(φ / 2),
      s = Math.sin(π / 4 * t);
  return [
    λ * (.74482 - .34588 * s * s),
    1.70711 * t
  ];
}

times.invert = function(x, y) {
  var t = y / 1.70711,
      s = Math.sin(π / 4 * t);
  return [
    x / (.74482 - .34588 * s * s),
    2 * Math.atan(t)
  ];
};

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

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/times.js
d3js-plugins-rails-0.0.7 vendor/assets/javascripts/d3/plugins/geo/projection/times.js
d3js-plugins-rails-0.0.6 vendor/assets/javascripts/d3/plugins/geo/projection/times.js
d3js-plugins-rails-0.0.5 vendor/assets/javascripts/d3/plugins/geo/projection/times.js