Class DoubleFunctions


  • public class DoubleFunctions
    extends Object
    This class is used to implement Features for doubles that one might need.
    • Constructor Detail

      • DoubleFunctions

        public DoubleFunctions()
    • Method Detail

      • roundToNearest

        public static Double roundToNearest​(double value,
                                            double multiplier)
        round to nearest sensible double
        Parameters:
        value - the input value
        multiplier - the multiplier to check
        Returns:
        the nearest value defined by multiplier ( roundToNearest(8,5) = 10,roundToNearest(6,10) = 10,roundToNearest(0.8,0.25) = 0.75)