ObjNumNullExt extension

on

Properties

isFinite bool?
Whether this number is finite.
no setter
isInfinite bool?
Whether this number is positive infinity or negative infinity.
no setter
isNaN bool?
Whether this number is a Not-a-Number value.
no setter
isNegative bool?
Whether this number is negative.
no setter
sign num?
Negative one, zero or positive one depending on the sign and numerical value of this number.
no setter

Methods

abs() num?
The absolute value of this number.
ceil() int?
The least integer no smaller than this.
ceilToDouble() double?
Returns the least double integer value no smaller than this.
clamp(num lowerLimit, num upperLimit) num?
Returns this num clamped to be in the range lowerLimit-upperLimit.
compareTo(num other) int?
Compares this to other.
floor() int?
The greatest integer no greater than this number.
floorToDouble() double?
Returns the greatest double integer value no greater than this.
remainder(num other) num?
The remainder of the truncating division of this by other.
round() int?
The integer closest to this number.
roundToDouble() double?
The double integer value closest to this value.
toDouble() double?
This number as a double.
toInt() int?
Truncates this num to an integer and returns the result as an int.
toStringAsExponential([int? fractionDigits]) String?
An exponential string-representation of this number.
toStringAsFixed(int fractionDigits) String?
A decimal-point string-representation of this number.
toStringAsPrecision(int precision) String?
A string representation with precision significant digits.
truncate() int?
The integer obtained by discarding any fractional digits from this.
truncateToDouble() double?
Returns the double integer value obtained by discarding any fractional digits from the double value of this.