mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-07 13:22:07 -05:00
Revert EPSILON error in solveCubic
This commit is contained in:
parent
78f65c9fab
commit
645e2c2af3
1 changed files with 2 additions and 2 deletions
|
@ -341,12 +341,12 @@ var Numerical = new function() {
|
||||||
}
|
}
|
||||||
// If a or d is zero, we only need to solve a quadratic, so we set
|
// If a or d is zero, we only need to solve a quadratic, so we set
|
||||||
// the coefficients appropriately.
|
// the coefficients appropriately.
|
||||||
if (a === 0) {
|
if (abs(a) < EPSILON) {
|
||||||
a = b;
|
a = b;
|
||||||
b1 = c;
|
b1 = c;
|
||||||
c2 = d;
|
c2 = d;
|
||||||
x = Infinity;
|
x = Infinity;
|
||||||
} else if (d === 0) {
|
} else if (abs(d) < EPSILON) {
|
||||||
b1 = b;
|
b1 = b;
|
||||||
c2 = c;
|
c2 = c;
|
||||||
x = 0;
|
x = 0;
|
||||||
|
|
Loading…
Reference in a new issue