Skip to content

Commit

Permalink
Merge pull request #2 from deargle/patch-1
Browse files Browse the repository at this point in the history
Fix default tolerance
  • Loading branch information
adam-hanna authored Aug 8, 2018
2 parents 85b5e4c + 880722a commit b0e8a85
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions goalSeek.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
function goalSeek(oParams) {
var g, Y, Y1, OldTarget;

oParams.Tol = (oParams.Tol || 0.001 * Goal);
oParams.Tol = (oParams.Tol || 0.001 * oParams.Goal || 0.1);
oParams.maxIter = (oParams.maxIter || 1000);

//is the independent variable within an object?
Expand Down Expand Up @@ -122,4 +122,4 @@ function getObjVal(Obj, propStr) {
};

return Cur;
};
};

0 comments on commit b0e8a85

Please sign in to comment.