operator - method
Subtracts other
from this number.
If the other
number is double
, the value is truncated after
subtraction
Returns i16
Implementation
@override
i16 operator -(dynamic other) {
if (other is integer) {
return i16(value - other.value);
} else if (other is int) {
return i16(value - other);
} else if (other is double) {
return i16((value - other).truncate());
} else {
throw Exception('Invalid type for operand: ${other.runtimeType}');
}
}