Package org.notima.util
Class NumberUtils
java.lang.Object
org.notima.util.NumberUtils
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic doubleroundToPrecision(double d, int precision) Round to precision.static BigDecimalroundToPrecision(BigDecimal bd, int precision) Round to precision.
-
Constructor Details
-
NumberUtils
public NumberUtils()
-
-
Method Details
-
roundToPrecision
Round to precision.- Parameters:
bd- The number to round.precision- The precision to round to- Returns:
- The rounded value.
-
roundToPrecision
public static double roundToPrecision(double d, int precision) Round to precision.- Parameters:
d- The number to round.precision- The precision to round to- Returns:
- The rounded value.
-