commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From l..@apache.org
Subject svn commit: r676291 - /commons/proper/math/branches/MATH_2_0/src/java/org/apache/commons/math/ode/sampling/AbstractStepInterpolator.java
Date Sun, 13 Jul 2008 09:55:02 GMT
Author: luc
Date: Sun Jul 13 02:55:01 2008
New Revision: 676291

URL: http://svn.apache.org/viewvc?rev=676291&view=rev
Log:
fixed a problem introduced by recent changes,
thanks to Phil to spot it

Modified:
    commons/proper/math/branches/MATH_2_0/src/java/org/apache/commons/math/ode/sampling/AbstractStepInterpolator.java

Modified: commons/proper/math/branches/MATH_2_0/src/java/org/apache/commons/math/ode/sampling/AbstractStepInterpolator.java
URL: http://svn.apache.org/viewvc/commons/proper/math/branches/MATH_2_0/src/java/org/apache/commons/math/ode/sampling/AbstractStepInterpolator.java?rev=676291&r1=676290&r2=676291&view=diff
==============================================================================
--- commons/proper/math/branches/MATH_2_0/src/java/org/apache/commons/math/ode/sampling/AbstractStepInterpolator.java
(original)
+++ commons/proper/math/branches/MATH_2_0/src/java/org/apache/commons/math/ode/sampling/AbstractStepInterpolator.java
Sun Jul 13 02:55:01 2008
@@ -240,7 +240,8 @@
       throws DerivativeException {
       interpolatedTime = time;
       final double oneMinusThetaH = currentTime - interpolatedTime;
-      computeInterpolatedState((h - oneMinusThetaH) / h, oneMinusThetaH);
+      final double theta = (h == 0) ? 0 : (h - oneMinusThetaH) / h;
+      computeInterpolatedState(theta, oneMinusThetaH);
   }
 
   /** {@inheritDoc} */



Mime
View raw message