Decimal class
Constructors
- Decimal.fromInt(int value)
-
factory
- Decimal.parse(String value)
-
factory
Properties
- hasFinitePrecision → bool
-
Inspect if this
num
has a finite precision.read-only - hashCode → int
-
The hash code for this object. [...]
read-only
- inverse → Decimal
-
read-only
- isInfinite → bool
-
read-only
- isInteger → bool
-
read-only
- isNaN → bool
-
read-only
- isNegative → bool
-
read-only
- precision → int
-
The precision of this
num
. [...]read-only - scale → int
-
The scale of this
num
. [...]read-only - signum → int
-
The signum function value of this
num
. [...]read-only - runtimeType → Type
-
A representation of the runtime type of the object.
read-only, inherited
Methods
-
abs(
) → Decimal -
Returns the absolute value of this
num
. -
ceil(
) → Decimal -
Returns the least integer value that is no smaller than this
num
. -
ceilToDouble(
) → double -
Returns the least integer value no smaller than
this
. [...] -
clamp(
Decimal lowerLimit Decimal upperLimit) → Decimal -
Clamps
this
to be in the rangelowerLimit
-upperLimit
. The comparison is done using compareTo and therefore takes-0.0
into account. -
compareTo(
Decimal other) → int -
Compares this object to another
Comparable
[...] -
floor(
) → Decimal -
Returns the greatest integer value no greater than this
num
. -
floorToDouble(
) → double -
Returns the greatest integer value no greater than
this
. [...] -
pow(
int exponent) → Decimal -
Returns
this
to the power ofexponent
. [...] -
remainder(
Decimal other) → Decimal -
Return the remainder from dividing this
num
byother
. -
round(
) → Decimal -
Returns the integer value closest to this
num
. [...] -
roundToDouble(
) → double -
Returns the integer value closest to
this
. [...] -
toDouble(
) → double -
Return this
num
as adouble
. [...] -
toInt(
) → int -
Truncates this
num
to an integer and returns the result as anint
. -
toString(
) → String - Returns a string representation of this object.
-
toStringAsExponential(
[int fractionDigits ]) → String -
Converts a
num
to a string in decimal exponential notation withfractionDigits
digits after the decimal point. -
toStringAsFixed(
int fractionDigits) → String -
Converts a
num
to a string representation withfractionDigits
digits after the decimal point. -
toStringAsPrecision(
int precision) → String -
Converts a
num
to a string representation withprecision
significant digits. -
truncate(
) → Decimal -
Returns the integer value obtained by discarding any fractional digits
from this
num
. -
truncateToDouble(
) → double -
Returns the integer obtained by discarding any fractional digits from
this
. [...] -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a non-existent method or property is accessed.
inherited
Operators
-
operator %(
Decimal other) → Decimal -
operator *(
Decimal other) → Decimal -
operator +(
Decimal other) → Decimal -
operator -(
Decimal other) → Decimal -
operator /(
Decimal other) → Decimal -
operator <(
Decimal other) → bool - Relational less than operator.
-
operator <=(
Decimal other) → bool - Relational less than or equal operator.
-
operator ==(
Object other) → bool - The equality operator. [...]
-
operator >(
Decimal other) → bool - Relational greater than operator.
-
operator >=(
Decimal other) → bool - Relational greater than or equal operator.
-
operator unary-(
) → Decimal -
operator ~/(
Decimal other) → Decimal - Truncating division operator. [...]