Class IntegerFunctions


  • public class IntegerFunctions
    extends Object
    • Constructor Detail

      • IntegerFunctions

        public IntegerFunctions()
    • Method Detail

      • roundToNearest

        public static int roundToNearest​(int value,
                                         int multiplier)
        round to nearest sensible int
        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)