DoubleExtionsion extension
Rounding and money formatting on doubles. 1234.5.separate3By3()
- on
Methods
-
separate3By3(
{int maxPrecision = 0}) → String -
Available on double, provided by the DoubleExtionsion extension
Cuts tomaxPrecisiondecimals (no rounding), then groups with commas. 1234567.891 → "1,234,567" -
toSafeInt(
{int? minValue, int? maxValue}) → int -
Available on double, provided by the DoubleExtionsion extension
toInt() clamped tominValue/maxValue.150.7.toSafeInt(maxValue: 100)→ 100 -
toStringAsSmartRound(
{int maxPrecision = 2}) → String -
Available on double, provided by the DoubleExtionsion extension
Cuts tomaxPrecisiondecimals and drops trailing zeros. 2.50 → "2.5", 3.0 → "3"