mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-19 14:10:14 -05: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++) {
|
||||
var fx = f(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)
|
||||
return x;
|
||||
// Generate a candidate for Newton's method.
|
||||
|
|
Loading…
Reference in a new issue