Package io.openems.common.utils
Class IntUtils
java.lang.Object
io.openems.common.utils.IntUtils
-
Nested Class Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic int
roundToPrecision
(double value, IntUtils.Round round, int precision) Rounds a value to a defined precision.
-
Constructor Details
-
IntUtils
public IntUtils()
-
-
Method Details
-
roundToPrecision
Rounds a value to a defined precision.Example: roundToPrecision(1234, Round.AWAY_FROM_ZERO, 100) -> 1300
- Parameters:
value
- the valueround
- the rounding modeprecision
- the decimal precision- Returns:
- the rounded value
-