negateDecimalFixedPoint function
Returns the additive inverse of a signed decimal fixed-point value.
Implementation
DecimalFixedPoint negateDecimalFixedPoint(DecimalFixedPoint value) {
if (value.signedness != FixedPointSignedness.signed) {
throw ArgumentError.value(
value.signedness,
'signedness',
'Expected a signed value.',
);
}
return _withDecimalRaw(value, -value.raw);
}