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:
parent
22e5ce3884
commit
b3cfa0fdb9
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue