ByteRoundingExtension extension
Provides convenience methods for rounding byte values.
- on
Methods
-
roundHalfEven(
{int precision = 2}) → double -
Available on double, provided by the ByteRoundingExtension extension
Rounds using banker's rounding (half to even). -
roundWithMode(
{int precision = 2, ByteRoundingMode mode = ByteRoundingMode.round}) → double -
Available on double, provided by the ByteRoundingExtension extension
Rounds this value using the specified RoundingMode. -
truncateWithPrecision(
{int precision = 2}) → double -
Available on double, provided by the ByteRoundingExtension extension
Truncates toward zero with specified precision.