Package de.kosmos_lab.utils
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 Summary
Constructors Constructor Description DoubleFunctions()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static DoubleroundToNearest(double value, double multiplier)round to nearest sensible double
-
-
-
Method Detail
-
roundToNearest
public static Double roundToNearest(double value, double multiplier)
round to nearest sensible double- Parameters:
value- the input valuemultiplier- 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)
-
-