eliminated unnecessary Double creation.

git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@539829 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Phil Steitz 2007-05-20 05:45:54 +00:00
parent fe13c2bcfa
commit 9f8370f336
1 changed files with 1 additions and 1 deletions

View File

@ -558,7 +558,7 @@ public final class MathUtils {
public static double round(double x, int scale, int roundingMethod) {
try {
return (new BigDecimal
(new Double(x).toString())
(Double.toString(x))
.setScale(scale, roundingMethod))
.doubleValue();
} catch (NumberFormatException ex) {