commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From er...@apache.org
Subject svn commit: r1365559 - /commons/proper/math/trunk/src/main/java/org/apache/commons/math3/analysis/FunctionUtils.java
Date Wed, 25 Jul 2012 12:40:14 GMT
Author: erans
Date: Wed Jul 25 12:40:14 2012
New Revision: 1365559

URL: http://svn.apache.org/viewvc?rev=1365559&view=rev
Log:
Added "final" keyword.

Modified:
    commons/proper/math/trunk/src/main/java/org/apache/commons/math3/analysis/FunctionUtils.java

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math3/analysis/FunctionUtils.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math3/analysis/FunctionUtils.java?rev=1365559&r1=1365558&r2=1365559&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math3/analysis/FunctionUtils.java
(original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math3/analysis/FunctionUtils.java
Wed Jul 25 12:40:14 2012
@@ -315,7 +315,7 @@ public class FunctionUtils {
      * {@code n} is negative
      */
     public static double[] sample(UnivariateFunction f,
-            double min, double max, int n) {
+                                  double min, double max, int n) {
 
         if (n <= 0) {
             throw new NotStrictlyPositiveException(
@@ -326,8 +326,8 @@ public class FunctionUtils {
             throw new NumberIsTooLargeException(min, max, false);
         }
 
-        double[] s = new double[n];
-        double h = (max - min) / n;
+        final double[] s = new double[n];
+        final double h = (max - min) / n;
         for (int i = 0; i < n; i++) {
             s[i] = f.value(min + i * h);
         }



Mime
View raw message