]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
Simplified the detection of double as integer
authorVincent Hennebert <vhennebert@apache.org>
Thu, 14 Feb 2008 11:36:01 +0000 (11:36 +0000)
committerVincent Hennebert <vhennebert@apache.org>
Thu, 14 Feb 2008 11:36:01 +0000 (11:36 +0000)
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@627712 13f79535-47bb-0310-9956-ffa450edef68

src/java/org/apache/fop/fo/properties/NumberProperty.java

index 087429dba2c29e596a36e6e9b35e86a2109dcb1b..6f8d8a1d264b9b8559190bf2e3be12518f7edcd7 100644 (file)
@@ -80,8 +80,7 @@ public final class NumberProperty extends Property implements Numeric {
     private NumberProperty(double num) {
         //Store the number as an int or a long,
         //if possible
-        if ((num >= 0 && num == Math.floor(num))
-                || num == Math.ceil(num)) {
+        if (num == Math.floor(num)) {
             if (num < Integer.MAX_VALUE) {
                 this.number = new Integer((int)num);
             } else {