You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by de...@apache.org on 2017/02/01 21:00:09 UTC
svn commit: r1781307 -
/myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/layout/MathUtils.java
Author: deki
Date: Wed Feb 1 21:00:09 2017
New Revision: 1781307
URL: http://svn.apache.org/viewvc?rev=1781307&view=rev
Log:
Equality tests should not be made with floating point values
Modified:
myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/layout/MathUtils.java
Modified: myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/layout/MathUtils.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/layout/MathUtils.java?rev=1781307&r1=1781306&r2=1781307&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/layout/MathUtils.java (original)
+++ myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/layout/MathUtils.java Wed Feb 1 21:00:09 2017
@@ -72,7 +72,7 @@ public final class MathUtils {
Integer indexOfMin = null;
for (int i = 0; i < list.length; i++) {
final double remainder = remainder(list[i]);
- if (remainder == 0) { // is zero
+ if (Double.compare(remainder, 0) == 0) { // is zero
continue;
}
if (remainder < min - EPSILON) {