From acaf4d9caaee8770481249c2f2e1fc3b83296c70 Mon Sep 17 00:00:00 2001 From: Gilles Sadowski Date: Thu, 16 Aug 2012 21:35:14 +0000 Subject: [PATCH] Change suggested by "FindBugs". git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1374071 13f79535-47bb-0310-9956-ffa450edef68 --- .../integration/gauss/LegendreHighPrecisionRuleFactory.java | 2 +- .../math3/analysis/integration/gauss/LegendreRuleFactory.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/apache/commons/math3/analysis/integration/gauss/LegendreHighPrecisionRuleFactory.java b/src/main/java/org/apache/commons/math3/analysis/integration/gauss/LegendreHighPrecisionRuleFactory.java index dda844355..7dae1e1dc 100644 --- a/src/main/java/org/apache/commons/math3/analysis/integration/gauss/LegendreHighPrecisionRuleFactory.java +++ b/src/main/java/org/apache/commons/math3/analysis/integration/gauss/LegendreHighPrecisionRuleFactory.java @@ -193,7 +193,7 @@ public class LegendreHighPrecisionRuleFactory extends BaseRuleFactory { weights[idx] = w; } // If "numberOfPoints" is odd, 0 is a root. - if (numberOfPoints % 2 == 1) { + if (numberOfPoints % 2 != 0) { double pmc = 1; for (int j = 1; j < numberOfPoints; j += 2) { pmc = -j * pmc / (j + 1);