mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-05 20:32:00 -05:00
Exclude 1 in parameter range for crossing counting, as segment points would be counted twice otherwise.
This commit is contained in:
parent
16578e6b15
commit
09ee9a0689
1 changed files with 1 additions and 1 deletions
|
@ -319,7 +319,7 @@ var Curve = this.Curve = Base.extend(/** @lends Curve# */{
|
|||
crossings = 0;
|
||||
for (var i = 0; i < count; i++) {
|
||||
var t = roots[i];
|
||||
if (t >= 0 && t <= 1 && Curve.evaluate(vals, t, 0).x > point.x) {
|
||||
if (t >= 0 && t < 1 && Curve.evaluate(vals, t, 0).x > point.x) {
|
||||
// If we're close to 0 and are not changing y-direction from the
|
||||
// previous curve, do not count this root, as we're merely
|
||||
// touching a tip. Passing 1 for Curve.evaluate()'s type means
|
||||
|
|
Loading…
Reference in a new issue