Class NumberUtils

java.lang.Object
org.notima.util.NumberUtils

public class NumberUtils extends Object
  • Constructor Details

    • NumberUtils

      public NumberUtils()
  • Method Details

    • roundToPrecision

      public static BigDecimal roundToPrecision(BigDecimal bd, int precision)
      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.