subChecked method
Throws StateError instead of wrapping on underflow.
Implementation
Uint64 subChecked(Uint64 other) {
if (other > this) throw IntegerError.overflow;
return this - other;
}
Throws StateError instead of wrapping on underflow.
Uint64 subChecked(Uint64 other) {
if (other > this) throw IntegerError.overflow;
return this - other;
}