subChecked method

U64 subChecked(
  1. U64 other
)

Implementation

U64 subChecked(U64 other) {
  var result = (value - other.value).toUnsigned(64);
  if (this < other) {
    throw StateError('U64 subtraction underflow');
  }
  return U64(result);
}