DoubleExtensions extension

Provides extended methods for double.

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

on

Properties

isEmpty bool
Returns true if double is 0.
no setter
isNotEmpty bool
Returns true if double is not 0.
no setter

Methods

format(String format) String
Enter format to replace the value of double with a string.
limit(double min, double max) double
If double is less than or equal to min, min is returned.
limitHigh(double max) double
If double is greater than or equal to max, max is returned.
limitLow(double min) double
If double is less than or equal to min, min is returned.
replaceNanOrInfinite([double replace = 0.0]) double
If double is double.nan, double.infinity, or double.negativeInfinity, replace it with replace.
roundBy([int base = 0]) double
Round double to the nearest base.