Change suggested by "FindBugs".

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1374071 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Gilles Sadowski 2012-08-16 21:35:14 +00:00
parent 02123844e8
commit acaf4d9caa
2 changed files with 2 additions and 2 deletions

View File

@ -193,7 +193,7 @@ public class LegendreHighPrecisionRuleFactory extends BaseRuleFactory<BigDecimal
weights[idx] = tmp2;
}
// If "numberOfPoints" is odd, 0 is a root.
if (numberOfPoints % 2 == 1) {
if (numberOfPoints % 2 != 0) {
BigDecimal pmc = BigDecimal.ONE;
for (int j = 1; j < numberOfPoints; j += 2) {
final BigDecimal b_j = new BigDecimal(j, mContext);

View File

@ -129,7 +129,7 @@ public class LegendreRuleFactory extends BaseRuleFactory<Double> {
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);