Fix to cover the case when Numerical.solveQuadratic return -1 in path._getMonoCurves culculation

This commit is contained in:
sapics 2016-06-16 13:46:02 +09:00
parent 2a668dd04e
commit c5b4828ace

View file

@ -979,7 +979,7 @@ Path.inject(/** @lends Path# */{
// Keep then range to 0 .. 1 (excluding) in the search for y // Keep then range to 0 .. 1 (excluding) in the search for y
// extrema. // extrema.
n = Numerical.solveQuadratic(a, b, c, roots, tMin, tMax); n = Numerical.solveQuadratic(a, b, c, roots, tMin, tMax);
if (n === 0) { if (n < 1) {
insertCurve(v); insertCurve(v);
} else { } else {
roots.sort(); roots.sort();