allow root search even in reverse direction

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/branches/MATH_2_0@675554 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Luc Maisonobe 2008-07-10 12:49:54 +00:00
parent 22e5ce3884
commit b3cfa0fdb9
1 changed files with 1 additions and 1 deletions

View File

@ -206,7 +206,7 @@ public class EventState implements Serializable {
});
solver.setAbsoluteAccuracy(convergence);
solver.setMaximalIterationCount(maxIterationCount);
final double root = solver.solve(ta, tb);
final double root = (ta <= tb) ? solver.solve(ta, tb) : solver.solve(tb, ta);
if (Double.isNaN(previousEventTime) ||
(Math.abs(previousEventTime - root) > convergence)) {
pendingEventTime = root;