Class DecimalUtils


  • public class DecimalUtils
    extends java.lang.Object
    Author:
    Loc Ha
    • Constructor Summary

      Constructors 
      Constructor Description
      DecimalUtils()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static double fixSign​(double roundedValue, double x)  
      static boolean isDifferent​(double d1, double d2, double delta)  
      static boolean isDifferent​(float f1, float f2, float delta)  
      static double round​(double x, int scale)  
      static double round​(double x, int scale, java.math.RoundingMode roundingMode)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • DecimalUtils

        public DecimalUtils()
    • Method Detail

      • round

        public static double round​(double x,
                                   int scale)
      • round

        public static double round​(double x,
                                   int scale,
                                   java.math.RoundingMode roundingMode)
      • fixSign

        public static double fixSign​(double roundedValue,
                                     double x)
      • isDifferent

        public static boolean isDifferent​(double d1,
                                          double d2,
                                          double delta)
      • isDifferent

        public static boolean isDifferent​(float f1,
                                          float f2,
                                          float delta)