Sha256: b257ca816b065c23c1f163f3b5a2e42fd9bc135f5ad8afdfd70dd7d88dea3dea

Contents?: true

Size: 1.07 KB

Versions: 4

Compression:

Stored size: 1.07 KB

Contents

var vows = require("vows"),
    assert = require("./assert"),
    load = require("./load");

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

suite.addBatch({
  "guyou": {
    topic: load("guyou"),
    "default": {
      topic: function(geo) { return geo.guyou(); },
      "projections and inverse projections": function(guyou) {
        assert.equalInverse(guyou, [  0,   0], [480,        250]);
        assert.equalInverse(guyou, [  0, -45], [480,        487.382], 1e-3);
        assert.equalInverse(guyou, [  0,  45], [480,         12.6172], 1e-4);
        assert.equalInverse(guyou, [-90,   0], [242.617240, 250]);
        assert.equalInverse(guyou, [ 90,   0], [717.382759, 250]);
        assert.equalInverse(guyou, [ 45,   0], [611.625205, 250]);
        assert.equalInverse(guyou, [-80,  15], [264.628233, 216.032299]);
        assert.equalInverse(guyou, [  1,   1], [483.160518, 246.839962]);
        assert.equalInverse(guyou, [ 15,  45], [561.412842,  86.826667]);
        assert.equalInverse(guyou, [180, -60], [823.140312, 487.382759], 1e-4);
      }
    }
  }
});

suite.export(module);

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