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
Modifier and Type Method Description static DoubleroundToNearest(double value, double multiplier)round to nearest sensible double
-
Constructor Details
-
DoubleFunctions
public DoubleFunctions()
-
-
Method Details
-
roundToNearest
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)
-