DoubleExtensions extension
Extensions for double operations and utilities.
- on
Properties
- absValue → double
-
Available on double, provided by the DoubleExtensions extension
Returns the absolute value of the number.no setter
Methods
-
clampTo(
double min, double max) → double -
Available on double, provided by the DoubleExtensions extension
Clamps the number betweenminandmax. -
formatAsString(
int decimals) → String -
Available on double, provided by the DoubleExtensions extension
Formats the number as a string with specified decimal places. -
isApproximatelyEqual(
double other, {double epsilon = 0.0001}) → bool -
Available on double, provided by the DoubleExtensions extension
Checks if the number is approximately equal tootherwithinepsilon. -
isBetween(
double min, double max) → bool -
Available on double, provided by the DoubleExtensions extension
Returnstrueif the number is betweenminandmax(inclusive). -
roundTo(
int decimals) → double -
Available on double, provided by the DoubleExtensions extension
Rounds the number to the specified number of decimal places. -
toFileSize(
{int decimals = 1}) → String -
Available on double, provided by the DoubleExtensions extension
Converts the number to a human-readable file size string. -
toPercentage(
{int decimals = 0}) → String -
Available on double, provided by the DoubleExtensions extension
Converts the number to a percentage string.