clamp method
Clamps this integer to be in the range lowerLimit
- upperLimit
.
Implementation
@override
Int64 clamp(Object lowerLimit, Object upperLimit) {
Int64 lower = _promote(lowerLimit);
Int64 upper = _promote(upperLimit);
if (this < lower) return lower;
if (this > upper) return upper;
return this;
}