From: Jeremias Maerki Date: Wed, 31 May 2006 13:41:50 +0000 (+0000) Subject: Don't do rounding here. The caller might now want that. X-Git-Tag: fop-0_93~208 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=4a1c328850ef3e44f35b164de6c67565a0705b9f;p=xmlgraphics-fop.git Don't do rounding here. The caller might now want that. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@410523 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/src/java/org/apache/fop/util/UnitConv.java b/src/java/org/apache/fop/util/UnitConv.java index 0c16cdc3f..939db056b 100644 --- a/src/java/org/apache/fop/util/UnitConv.java +++ b/src/java/org/apache/fop/util/UnitConv.java @@ -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; } }