Skip to content

Commit 790e9d8

Browse files
committed
fix bleeding #30
2 parents f85ae1c + a08a09e commit 790e9d8

File tree

2 files changed

+4
-10
lines changed

2 files changed

+4
-10
lines changed

src/pointEqual.js

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import {abs, epsilon} from "./math.js";
2-
3-
export default function(a, b) {
4-
return abs(a[0] - b[0]) < epsilon && abs(a[1] - b[1]) < epsilon;
5-
}
1+
export default function pointEqual(a, b) {
2+
return a && b && a[0] === b[0] && a[1] === b[1];
3+
}

src/polyhedral/index.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import {geoBounds as bounds, geoCentroid as centroid, geoInterpolate as interpol
22
import {default as clipPolygon} from "../clip/polygon.js";
33
import {abs, degrees, epsilon, radians} from "../math.js";
44
import {default as matrix, multiply, inverse} from "./matrix.js";
5+
import pointEqual from "../pointEqual.js";
56

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

135-
// Tests equality of two spherical points.
136-
function pointEqual(a, b) {
137-
return a && b && a[0] === b[0] && a[1] === b[1];
138-
}
139-
140136
// Finds a shared edge given two clockwise polygons.
141137
function sharedEdge(a, b) {
142138
var x, y, n = a.length, found = null;

0 commit comments

Comments
 (0)