negateDecimalFixedPoint
Returns the additive inverse of a signed DecimalFixedPoint.
Unsigned values are rejected at the type level; they are also rejected
at runtime with SOLANA_ERROR__FIXED_POINTS__SHAPE_MISMATCH in case the
type safety is bypassed. Negating the minimum representable value
overflows and throws SOLANA_ERROR__FIXED_POINTS__ARITHMETIC_OVERFLOW.
Type Parameters
| Type Parameter |
|---|
TTotalBits extends number |
TDecimals extends number |
Parameters
| Parameter | Type |
|---|---|
a | DecimalFixedPoint<"signed", TTotalBits, TDecimals> |
Returns
DecimalFixedPoint<"signed", TTotalBits, TDecimals>