Package com.github.toolarium.common.util
Class RoundUtil
- java.lang.Object
-
- com.github.toolarium.common.util.RoundUtil
-
public final class RoundUtil extends java.lang.ObjectRound util class.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static RoundUtilgetInstance()Get the instancedoubleround(double val, int scale)Round double valuesintroundToInt(double val)Round double valueslongroundToLong(double val)Round double values
-
-
-
Method Detail
-
getInstance
public static RoundUtil getInstance()
Get the instance- Returns:
- the instance
-
round
public double round(double val, int scale)Round double values- Parameters:
val- the value to roundscale- the next- Returns:
- the rounded value
-
roundToInt
public int roundToInt(double val)
Round double values- Parameters:
val- the value to round- Returns:
- the rounded value
-
roundToLong
public long roundToLong(double val)
Round double values- Parameters:
val- the value to round- Returns:
- the rounded value
-
-