Class DoubleFunctions

java.lang.Object
de.kosmos_lab.utils.DoubleFunctions

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

    • DoubleFunctions

      public DoubleFunctions()
  • Method Details

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