abs method Null safety

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();