DoubleExtensions extension

Provides extended methods for double.

double用の拡張メソッドを提供します。

on

Properties

isEmpty bool

Available on double, provided by the DoubleExtensions extension

Returns true if double is 0.
no setter
isNotEmpty bool

Available on double, provided by the DoubleExtensions extension

Returns true if double is not 0.
no setter

Methods

format(String format) String

Available on double, provided by the DoubleExtensions extension

Enter format to replace the value of double with a string.
limit(double min, double max) double

Available on double, provided by the DoubleExtensions extension

If double is less than or equal to min, min is returned.
limitHigh(double max) double

Available on double, provided by the DoubleExtensions extension

If double is greater than or equal to max, max is returned.
limitLow(double min) double

Available on double, provided by the DoubleExtensions extension

If double is less than or equal to min, min is returned.
replaceNanOrInfinite([double replace = 0.0]) double

Available on double, provided by the DoubleExtensions extension

If double is double.nan, double.infinity, or double.negativeInfinity, replace it with replace.
roundBy([int base = 0]) double

Available on double, provided by the DoubleExtensions extension

Round double to the nearest base.