From 645e2c2af3d0cc4c446c5537aebd9b8031482973 Mon Sep 17 00:00:00 2001 From: sapics Date: Mon, 20 Jun 2016 17:27:08 +0900 Subject: [PATCH] Revert EPSILON error in solveCubic --- src/util/Numerical.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/util/Numerical.js b/src/util/Numerical.js index 50aec173..bb3c4df0 100644 --- a/src/util/Numerical.js +++ b/src/util/Numerical.js @@ -341,12 +341,12 @@ var Numerical = new function() { } // If a or d is zero, we only need to solve a quadratic, so we set // the coefficients appropriately. - if (a === 0) { + if (abs(a) < EPSILON) { a = b; b1 = c; c2 = d; x = Infinity; - } else if (d === 0) { + } else if (abs(d) < EPSILON) { b1 = b; c2 = c; x = 0;