Skip to content

Commit

Permalink
fix bleeding #30
Browse files Browse the repository at this point in the history
  • Loading branch information
Fil committed Dec 28, 2019
2 parents f85ae1c + a08a09e commit 790e9d8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 10 deletions.
8 changes: 3 additions & 5 deletions src/pointEqual.js
@@ -1,5 +1,3 @@
import {abs, epsilon} from "./math.js";

export default function(a, b) {
return abs(a[0] - b[0]) < epsilon && abs(a[1] - b[1]) < epsilon;
}
export default function pointEqual(a, b) {
return a && b && a[0] === b[0] && a[1] === b[1];
}
6 changes: 1 addition & 5 deletions src/polyhedral/index.js
Expand Up @@ -2,6 +2,7 @@ import {geoBounds as bounds, geoCentroid as centroid, geoInterpolate as interpol
import {default as clipPolygon} from "../clip/polygon.js";
import {abs, degrees, epsilon, radians} from "../math.js";
import {default as matrix, multiply, inverse} from "./matrix.js";
import pointEqual from "../pointEqual.js";

// Creates a polyhedral projection.
// * tree: a spanning tree of polygon faces. Nodes are automatically
Expand Down Expand Up @@ -132,11 +133,6 @@ function outline(stream, node, parent) {
}
}

// Tests equality of two spherical points.
function pointEqual(a, b) {
return a && b && a[0] === b[0] && a[1] === b[1];
}

// Finds a shared edge given two clockwise polygons.
function sharedEdge(a, b) {
var x, y, n = a.length, found = null;
Expand Down

0 comments on commit 790e9d8

Please sign in to comment.