mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-06-05 09:43:58 -04:00
Improve explanatory comments.
This commit is contained in:
parent
046f9cef6e
commit
d5e7ca9f5e
1 changed files with 2 additions and 0 deletions
|
@ -83,6 +83,8 @@ var Numerical = new function() {
|
||||||
for (var i = 0; i < n; i++) {
|
for (var i = 0; i < n; i++) {
|
||||||
var fx = f(x),
|
var fx = f(x),
|
||||||
dx = fx / df(x);
|
dx = fx / df(x);
|
||||||
|
// See if we can trust the Newton-Raphson result. If not we use
|
||||||
|
// bisection to find another candiate for Newton's method.
|
||||||
if (Math.abs(dx) < tol)
|
if (Math.abs(dx) < tol)
|
||||||
return x;
|
return x;
|
||||||
// Generate a candidate for Newton's method.
|
// Generate a candidate for Newton's method.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue