abs method - int class - dart:core library (original) (raw)
abs abstract method
int abs()
override
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
int abs();