commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From l..@apache.org
Subject svn commit: r675554 - /commons/proper/math/branches/MATH_2_0/src/java/org/apache/commons/math/ode/events/EventState.java
Date Thu, 10 Jul 2008 12:49:55 GMT
Author: luc
Date: Thu Jul 10 05:49:54 2008
New Revision: 675554

URL: http://svn.apache.org/viewvc?rev=675554&view=rev
Log:
allow root search even in reverse direction

Modified:
    commons/proper/math/branches/MATH_2_0/src/java/org/apache/commons/math/ode/events/EventState.java

Modified: commons/proper/math/branches/MATH_2_0/src/java/org/apache/commons/math/ode/events/EventState.java
URL: http://svn.apache.org/viewvc/commons/proper/math/branches/MATH_2_0/src/java/org/apache/commons/math/ode/events/EventState.java?rev=675554&r1=675553&r2=675554&view=diff
==============================================================================
--- commons/proper/math/branches/MATH_2_0/src/java/org/apache/commons/math/ode/events/EventState.java
(original)
+++ commons/proper/math/branches/MATH_2_0/src/java/org/apache/commons/math/ode/events/EventState.java
Thu Jul 10 05:49:54 2008
@@ -206,7 +206,7 @@
                     });
                     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;



Mime
View raw message