Author: erans
Date: Fri Aug 17 09:50:54 2012
New Revision: 1374187

URL: http://svn.apache.org/viewvc?rev=1374187&view=rev
Log:
Code comment.

Modified:
    
commons/proper/math/trunk/src/main/java/org/apache/commons/math3/analysis/integration/gauss/LegendreHighPrecisionRuleFactory.java
    
commons/proper/math/trunk/src/main/java/org/apache/commons/math3/analysis/integration/gauss/LegendreRuleFactory.java

Modified: 
commons/proper/math/trunk/src/main/java/org/apache/commons/math3/analysis/integration/gauss/LegendreHighPrecisionRuleFactory.java
URL: 
http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math3/analysis/integration/gauss/LegendreHighPrecisionRuleFactory.java?rev=1374187&r1=1374186&r2=1374187&view=diff
==============================================================================
--- 
commons/proper/math/trunk/src/main/java/org/apache/commons/math3/analysis/integration/gauss/LegendreHighPrecisionRuleFactory.java
 (original)
+++ 
commons/proper/math/trunk/src/main/java/org/apache/commons/math3/analysis/integration/gauss/LegendreHighPrecisionRuleFactory.java
 Fri Aug 17 09:50:54 2012
@@ -193,6 +193,9 @@ public class LegendreHighPrecisionRuleFa
             weights[idx] = tmp2;
         }
         // If "numberOfPoints" is odd, 0 is a root.
+        // Note: as written, the test for oddness will work for negative
+        // integers too (although it is not necessary here), preventing
+        // a FindBugs warning.
         if (numberOfPoints % 2 != 0) {
             BigDecimal pmc = BigDecimal.ONE;
             for (int j = 1; j < numberOfPoints; j += 2) {

Modified: 
commons/proper/math/trunk/src/main/java/org/apache/commons/math3/analysis/integration/gauss/LegendreRuleFactory.java
URL: 
http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math3/analysis/integration/gauss/LegendreRuleFactory.java?rev=1374187&r1=1374186&r2=1374187&view=diff
==============================================================================
--- 
commons/proper/math/trunk/src/main/java/org/apache/commons/math3/analysis/integration/gauss/LegendreRuleFactory.java
 (original)
+++ 
commons/proper/math/trunk/src/main/java/org/apache/commons/math3/analysis/integration/gauss/LegendreRuleFactory.java
 Fri Aug 17 09:50:54 2012
@@ -129,6 +129,9 @@ public class LegendreRuleFactory extends
             weights[idx] = w;
         }
         // If "numberOfPoints" is odd, 0 is a root.
+        // Note: as written, the test for oddness will work for negative
+        // integers too (although it is not necessary here), preventing
+        // a FindBugs warning.
         if (numberOfPoints % 2 != 0) {
             double pmc = 1;
             for (int j = 1; j < numberOfPoints; j += 2) {


Reply via email to