# d3/d3

Use `inDelta` not `equals` for double comparisons in polygon area test

• Loading branch information...
1 parent 4e9cbcb commit 97d9cb30a833a5b9f1e790f7a71063c43c9539e5 DanGoldbach committed Dec 5, 2013
Showing with 3 additions and 3 deletions.
1. +3 −3 test/geo/area-test.js
 @@ -47,7 +47,7 @@ suite.addBatch({ assert.inDelta(area({type: "Polygon", coordinates: [[[0, 0], [0, 90], [90, 0], [0, 0]]]}), π / 2, 1e-6); }, "lune": function(area) { - assert.equal(area({type: "Polygon", coordinates: [[[0, 0], [0, 90], [90, 0], [0, -90], [0, 0]]]}), π); + assert.inDelta(area({type: "Polygon", coordinates: [[[0, 0], [0, 90], [90, 0], [0, -90], [0, 0]]]}), π, 1e-6); }, "hemispheres": { "North": function(area) { @@ -57,10 +57,10 @@ suite.addBatch({ assert.inDelta(area({type: "Polygon", coordinates: [[[0, 0], [90, 0], [180, 0], [-90, 0], [0, 0]]]}), 2 * π, 1e-6); }, "East": function(area) { - assert.equal(area({type: "Polygon", coordinates: [[[0, 0], [0, 90], [180, 0], [0, -90], [0, 0]]]}), 2 * π); + assert.inDelta(area({type: "Polygon", coordinates: [[[0, 0], [0, 90], [180, 0], [0, -90], [0, 0]]]}), 2 * π, 1e-6); }, "West": function(area) { - assert.equal(area({type: "Polygon", coordinates: [[[0, 0], [0, -90], [180, 0], [0, 90], [0, 0]]]}), 2 * π); + assert.inDelta(area({type: "Polygon", coordinates: [[[0, 0], [0, -90], [180, 0], [0, 90], [0, 0]]]}), 2 * π, 1e-6); } }, "graticule outline": {

#### 0 comments on commit `97d9cb3`

Please sign in to comment.