mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-05 20:32:00 -05:00
Improve CurveLocation#equals()
Relates to #784, described in https://github.com/paperjs/paper.js/issues/784#issuecomment-143161586
This commit is contained in:
parent
4e9bac1ca5
commit
2a7d1c5728
1 changed files with 3 additions and 1 deletions
|
@ -365,8 +365,10 @@ var CurveLocation = Base.extend(/** @lends CurveLocation# */{
|
|||
|| loc instanceof CurveLocation
|
||||
// Call getCurve() and getParameter() to keep in sync
|
||||
&& this.getCurve() === loc.getCurve()
|
||||
&& this.getPoint().isClose(loc.getPoint(),
|
||||
&& (this.getPoint().isClose(loc.getPoint(),
|
||||
/*#=*/Numerical.GEOMETRIC_EPSILON)
|
||||
|| Math.abs(this.getParameter() - loc.getParameter())
|
||||
< /*#=*/Numerical.CURVETIME_EPSILON)
|
||||
&& (_ignoreOther
|
||||
|| (!this._intersection && !loc._intersection
|
||||
|| this._intersection && this._intersection.equals(
|
||||
|
|
Loading…
Reference in a new issue