forked from w8r/martinez
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from mfogel/fix-overlapping-edges-#35
Fix overlapping edges w8r#35
- Loading branch information
Showing
3 changed files
with
35 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,10 +14,19 @@ boolean.default = boolean; | |
module.exports = boolean; | ||
|
||
},{"./src/index":12}],2:[function(require,module,exports){ | ||
/** | ||
* avl v1.4.1 | ||
* Fast AVL tree for Node and browser | ||
* | ||
* @author Alexander Milevski <[email protected]> | ||
* @license MIT | ||
* @preserve | ||
*/ | ||
|
||
(function (global, factory) { | ||
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : | ||
typeof define === 'function' && define.amd ? define(factory) : | ||
(global.avl = factory()); | ||
(global.AVLTree = factory()); | ||
}(this, (function () { 'use strict'; | ||
|
||
/** | ||
|
@@ -733,6 +742,8 @@ AVLTree.prototype.toString = function toString (printNode) { | |
|
||
Object.defineProperties( AVLTree.prototype, prototypeAccessors ); | ||
|
||
AVLTree.default = AVLTree; | ||
|
||
return AVLTree; | ||
|
||
}))); | ||
|
@@ -1649,7 +1660,15 @@ module.exports = function (a1, a2, b1, b2, noEndpointTouch) { | |
// not on line segment b | ||
return null; | ||
} | ||
return noEndpointTouch ? null : [toPoint(a1, s, va)]; | ||
if (s === 0 || s === 1) { | ||
// on an endpoint of line segment a | ||
return noEndpointTouch ? null : [toPoint(a1, s, va)]; | ||
} | ||
if (t === 0 || t === 1) { | ||
// on an endpoint of line segment b | ||
return noEndpointTouch ? null : [toPoint(b1, t, vb)]; | ||
} | ||
return [toPoint(a1, s, va)]; | ||
} | ||
|
||
// If we've reached this point, then the lines are either parallel or the | ||
|
@@ -1757,7 +1776,7 @@ module.exports = function subdivide(eventQueue, subject, clipping, sbbox, cbbox, | |
if (next) { | ||
if (possibleIntersection(event, next.key, eventQueue) === 2) { | ||
computeFields(event, prevEvent, operation); | ||
computeFields(event, next.key, operation); | ||
computeFields(next.key, event, operation); | ||
} | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters