]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
Don't do rounding here. The caller might now want that.
authorJeremias Maerki <jeremias@apache.org>
Wed, 31 May 2006 13:41:50 +0000 (13:41 +0000)
committerJeremias Maerki <jeremias@apache.org>
Wed, 31 May 2006 13:41:50 +0000 (13:41 +0000)
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@410523 13f79535-47bb-0310-9956-ffa450edef68

src/java/org/apache/fop/util/UnitConv.java

index 0c16cdc3fa35437ae524928ea379612eca3a73dc..939db056b250c939f3a322410c2e92979bd00d6a 100644 (file)
@@ -101,8 +101,8 @@ public final class UnitConv {
      * @param resolution the resolution in dpi (dots per inch)
      * @return the value in pixels
      */
-    public static int mm2px(double mm, int resolution) {
-        return (int)Math.round(mm2in(mm) * resolution);
+    public static double mm2px(double mm, int resolution) {
+        return mm2in(mm) * resolution;
     }
 
     /**
@@ -111,8 +111,8 @@ public final class UnitConv {
      * @param resolution the resolution in dpi (dots per inch)
      * @return the value in pixels
      */
-    public static int mpt2px(double mpt, int resolution) {
-        return (int)Math.round(mpt2in(mpt) * resolution);
+    public static double mpt2px(double mpt, int resolution) {
+        return mpt2in(mpt) * resolution;
     }
 
 }