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:
parent
fe13c2bcfa
commit
9f8370f336
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue