Skip to content

Commit

Permalink
build v0.3.4
Browse files Browse the repository at this point in the history
  • Loading branch information
w8r committed May 27, 2018
1 parent 47641be commit ed6125e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions dist/martinez.js
Original file line number Diff line number Diff line change
Expand Up @@ -1483,6 +1483,8 @@ module.exports = function possibleIntersection(se1, se2, queue) {
},{"./compare_events":4,"./divide_segment":8,"./edge_type":9,"./equals":10,"./segment_intersection":15}],15:[function(require,module,exports){
'use strict';

//var EPS = 1e-9;

/**
* Finds the magnitude of the cross product of two vectors (if we pretend
* they're in three dimensions)
Expand Down Expand Up @@ -1561,7 +1563,7 @@ module.exports = function (a1, a2, b1, b2, noEndpointTouch) {
// cross product is the 0 vector. The full calculation involves relative error
// to account for possible very small line segments. See Schneider & Eberly
// for details.
if (sqrKross > 0) {
if (sqrKross > 0/* EPS * sqrLenB * sqLenA */) {
// If they're not parallel, then (because these are line segments) they
// still might not actually intersect. This code checks that the
// intersection point of the lines is actually on both line segments.
Expand Down Expand Up @@ -1596,7 +1598,7 @@ module.exports = function (a1, a2, b1, b2, noEndpointTouch) {
kross = crossProduct(e, va);
sqrKross = kross * kross;

if (sqrKross > 0) {
if (sqrKross > 0 /* EPS * sqLenB * sqLenE */) {
// Lines are just parallel, not the same. No overlap.
return null;
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "martinez-polygon-clipping",
"version": "0.3.3",
"version": "0.3.4",
"description": "Martinez polygon clipping algorithm, does boolean operation on polygons (multipolygons, polygons with holes etc): intersection, union, difference, xor",
"main": "dist/martinez.js",
"types": "index.d.ts",
Expand Down

0 comments on commit ed6125e

Please sign in to comment.