Compare points instead of curve time paramters for better precision and reliability.

This commit is contained in:
Jürg Lehni 2015-09-21 10:53:53 -04:00
parent e36319b71a
commit 812ac63e60

View file

@ -371,8 +371,8 @@ var CurveLocation = Base.extend(/** @lends CurveLocation# */{
|| loc instanceof CurveLocation
// Call getCurve() and getParameter() to keep in sync
&& this.getCurve() === loc.getCurve()
&& Math.abs(this.getParameter() - loc.getParameter())
< /*#=*/Numerical.CURVETIME_EPSILON
&& this.getPoint().isClose(loc.getPoint(),
/*#=*/Numerical.GEOMETRIC_EPSILON)
&& (_ignoreOther
|| (!this._intersection && !loc._intersection
|| this._intersection && this._intersection.equals(