mulChecked method
- Uint16 other
Evaluates exact strict mathematical bounding conditions without truncating natively.
Implementation
Uint16 mulChecked(Uint16 other) {
final result = value * other.value;
if (result > 65535 || result < 0) throw StateError('Uint16 multiplication overflow');
return Uint16.from(result);
}