From 0050984d8395fdbe06b2456bcff6ce75fda3758e Mon Sep 17 00:00:00 2001 From: sapics Date: Sat, 24 Oct 2015 11:36:21 +0900 Subject: [PATCH] Remove unnecessary calculation --- src/util/Numerical.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/util/Numerical.js b/src/util/Numerical.js index 85a88abc..053637df 100644 --- a/src/util/Numerical.js +++ b/src/util/Numerical.js @@ -318,7 +318,7 @@ var Numerical = new function() { qd = (tmp + b1) * x + c2; q = c2 * x + d; // Get a good initial approximation. - t = q /a; + t = q / a; r = pow(abs(t), 1/3); s = t < 0 ? -1 : 1; t = -qd / a; @@ -337,10 +337,6 @@ var Numerical = new function() { // Newton's. Divide by ec to avoid x0 crossing over a // root. x0 = qd === 0 ? x : x - q / qd / ec; - if (x0 === x) { - x = x0; - break; - } } while (s * x0 > s * x); // Adjust the coefficients for the quadratic. if (abs(a) * x * x > abs(d / x)) {