mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-05 20:32:00 -05:00
Fix wrong number of iterations in False Position method.
This commit is contained in:
parent
11e70c5069
commit
a794816097
1 changed files with 1 additions and 2 deletions
|
@ -70,7 +70,6 @@ var Numerical = new function() {
|
|||
var Ax = A * x[i];
|
||||
sum += w[i++] * (f(B + Ax) + f(B - Ax));
|
||||
}
|
||||
|
||||
return A * sum;
|
||||
},
|
||||
|
||||
|
@ -95,7 +94,7 @@ var Numerical = new function() {
|
|||
fb = f(b),
|
||||
dx = b - a,
|
||||
del, x;
|
||||
for (var i = 0; i <= n; i++) {
|
||||
for (var i = 0; i < n; i++) {
|
||||
x = a + dx * fa / (fa - fb);
|
||||
var fx = f(x);
|
||||
if (fx < 0) {
|
||||
|
|
Loading…
Reference in a new issue