Sha256: c6be185216c0a2766a98aacb3a2c183c0d3012f706caa76c7a0cec04de3b8b71

Contents?: true

Size: 1 KB

Versions: 4

Compression:

Stored size: 1 KB

Contents

require("./env");

var vows = require("vows"),
    assert = require("assert");

var suite = vows.describe("d3.geo.robinson");

suite.addBatch({
  "robinson": {
    topic: d3.geo.robinson,
    "projections and inverse projections": function(robinson) {
      assert.equalInverse(robinson, [   1,   1], [482.617847, 247.036246]);
      assert.equalInverse(robinson, [  45,  87], [545.397120,  14.047945]);
      assert.equalInverse(robinson, [   0,   0], [480,        250]);
      assert.equalInverse(robinson, [   0, -90], [480,        489.012369]);
      assert.equalInverse(robinson, [   0,  90], [480,         10.987630]);
      assert.equalInverse(robinson, [   0, -45], [480,        383.153790]);
      assert.equalInverse(robinson, [   0,  45], [480,        116.846209]);
      assert.equalInverse(robinson, [-180,   0], [  8.761101, 250]);
      assert.equalInverse(robinson, [ 180,   0], [951.238898, 250]);
      assert.equalInverse(robinson, [-179,  15], [ 16.065304, 205.543699]);
    }
  }
});

suite.export(module);

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
d3js-plugins-rails-0.0.4 vendor/assets/javascripts/d3/plugins/geo/projection/test/robinson-test.js
d3js-plugins-rails-0.0.3 vendor/assets/javascripts/d3/plugins/geo/projection/test/robinson-test.js
d3js-plugins-rails-0.0.2 vendor/assets/javascripts/d3/plugins/geo/projection/test/robinson-test.js
d3js-plugins-rails-0.0.1 vendor/assets/javascripts/d3/plugins/geo/projection/test/robinson-test.js