Class IntegerFunctions

java.lang.Object
de.kosmos_lab.utils.IntegerFunctions

public class IntegerFunctions
extends Object
  • Constructor Details

    • IntegerFunctions

      public IntegerFunctions()
  • Method Details

    • 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)