Sha256: 72bdc90e671b3b4339bd4a5f77fae5b88ca0528c973b2bf3deae6209d341461a

Contents?: true

Size: 1.09 KB

Versions: 4

Compression:

Stored size: 1.09 KB

Contents

require("./env");

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

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

suite.addBatch({
  "armadillo": {
    topic: d3.geo.armadillo,
    "projections and inverse projections": function(armadillo) {
      assert.equalInverse(armadillo, [   0,   0], [480,        250]);
      // TODO: needs D3 core support
      // assert.isNaN(armadillo([0, -90])[0]);
      assert.equalInverse(armadillo, [   0,  90], [480,         57.743085]);
      assert.equalInverse(armadillo, [   0, -45], [480,        334.643146]);
      assert.equalInverse(armadillo, [   0,  45], [480,        135.304239]);
      // TODO figure out why the inverse doesn't match exactly.
      // assert.equalInverse(armadillo, [-180,   0], [180, 147.393957]);
      // assert.equalInverse(armadillo, [ 180,   0], [780, 147.393957]);
      assert.equalInverse(armadillo, [-179,  15], [185.122354, 111.792545]);
      assert.equalInverse(armadillo, [   1,   1], [482.617761, 247.528295]);
      assert.equalInverse(armadillo, [  45,  87], [540.406730,  56.511657]);
    }
  }
});

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/armadillo-test.js
d3js-plugins-rails-0.0.3 vendor/assets/javascripts/d3/plugins/geo/projection/test/armadillo-test.js
d3js-plugins-rails-0.0.2 vendor/assets/javascripts/d3/plugins/geo/projection/test/armadillo-test.js
d3js-plugins-rails-0.0.1 vendor/assets/javascripts/d3/plugins/geo/projection/test/armadillo-test.js