subChecked method

U16 subChecked(
  1. U16 other
)

Implementation

U16 subChecked(U16 other) {
  var result = value - other.value;
  if (result < 0) throw StateError('U16 subtraction underflow');
  return U16(result);
}