abs method
Returns the absolute value of this integer.
For any integer value
,
the result is the same as value < 0 ? -value : value
.
Integer overflow may cause the result of -value
to stay negative.
Implementation
double abs() => value.abs();
Returns the absolute value of this integer.
For any integer value
,
the result is the same as value < 0 ? -value : value
.
Integer overflow may cause the result of -value
to stay negative.
double abs() => value.abs();