ObjNumExt extension
Properties
- isFinite → bool
-
Available on Obj<
Whether this number is finite.num> , provided by the ObjNumExt extensionno setter - isInfinite → bool
-
Available on Obj<
Whether this number is positive infinity or negative infinity.num> , provided by the ObjNumExt extensionno setter - isNaN → bool
-
Available on Obj<
Whether this number is a Not-a-Number value.num> , provided by the ObjNumExt extensionno setter - isNegative → bool
-
Available on Obj<
Whether this number is negative.num> , provided by the ObjNumExt extensionno setter - sign → num
-
Available on Obj<
Negative one, zero or positive one depending on the sign and numerical value of this number.num> , provided by the ObjNumExt extensionno setter
Methods
-
abs(
) → num - The absolute value of this number.
-
ceil(
) → int -
Available on Obj<
The least integer no smaller thannum> , provided by the ObjNumExt extensionthis
. -
ceilToDouble(
) → double -
Available on Obj<
Returns the least double integer value no smaller thannum> , provided by the ObjNumExt extensionthis
. -
clamp(
num lowerLimit, num upperLimit) → num -
Available on Obj<
Returns this num clamped to be in the rangenum> , provided by the ObjNumExt extensionlowerLimit
-upperLimit
. -
compareTo(
num other) → int -
Available on Obj<
Compares this tonum> , provided by the ObjNumExt extensionother
. -
floor(
) → int - The greatest integer no greater than this number.
-
floorToDouble(
) → double -
Available on Obj<
Returns the greatest double integer value no greater thannum> , provided by the ObjNumExt extensionthis
. -
remainder(
num other) → num -
Available on Obj<
The remainder of the truncating division ofnum> , provided by the ObjNumExt extensionthis
byother
. -
round(
) → int - The integer closest to this number.
-
roundToDouble(
) → double - The double integer value closest to this value.
-
toDouble(
) → double -
Available on Obj<
This number as a double.num> , provided by the ObjNumExt extension -
toInt(
) → int -
Available on Obj<
Truncates this num to an integer and returns the result as an int.num> , provided by the ObjNumExt extension -
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 -
Available on Obj<
A string representation withnum> , provided by the ObjNumExt extensionprecision
significant digits. -
truncate(
) → int -
Available on Obj<
The integer obtained by discarding any fractional digits fromnum> , provided by the ObjNumExt extensionthis
. -
truncateToDouble(
) → double -
Available on Obj<
Returns the double integer value obtained by discarding any fractional digits from the double value ofnum> , provided by the ObjNumExt extensionthis
.
Operators
-
operator %(
Obj< num> other) → Obj<num> -
Available on Obj<
Euclidean modulo of this number bynum> , provided by the ObjNumExt extensionother
. -
operator *(
Obj< num> other) → Obj<num> -
Available on Obj<
Multiplies this number bynum> , provided by the ObjNumExt extensionother
. -
operator +(
Obj< num> other) → Obj<num> -
Available on Obj<
Addsnum> , provided by the ObjNumExt extensionother
to this number. -
operator -(
Obj< num> other) → Obj<num> -
Available on Obj<
Subtractsnum> , provided by the ObjNumExt extensionother
from this number. -
operator /(
Obj< num> other) → Obj<double> -
Available on Obj<
Divides this number bynum> , provided by the ObjNumExt extensionother
. -
operator <(
Obj< num> other) → bool -
Available on Obj<
Whether this number is numerically smaller thannum> , provided by the ObjNumExt extensionother
. -
operator <=(
Obj< num> other) → bool -
Available on Obj<
Whether this number is numerically smaller than or equal tonum> , provided by the ObjNumExt extensionother
. -
operator >(
Obj< num> other) → bool -
Available on Obj<
Whether this number is numerically greater thannum> , provided by the ObjNumExt extensionother
. -
operator >=(
Obj< num> other) → bool -
Available on Obj<
Whether this number is numerically greater than or equal tonum> , provided by the ObjNumExt extensionother
. -
operator unary-(
) → Obj< num> - The negation of this value.
-
operator ~/(
Obj< num> other) → Obj<int> - Truncating division operator.