subtractOverflows method

bool subtractOverflows(
  1. int other
)

Checks if the subtraction of other from this causes an overflow.

Implementation

bool subtractOverflows(int other) => ((other < 0) && (this > max + other)) || ((other > 0) && (this < min + other));