Revert EPSILON error in solveCubic

This commit is contained in:
sapics 2016-06-20 17:27:08 +09:00
parent 78f65c9fab
commit 645e2c2af3

View file

@ -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;