Class RoundUtil

java.lang.Object
com.github.toolarium.common.util.RoundUtil

public final class RoundUtil extends Object
Round util class.
  • Method Details

    • 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 round
      scale - 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