toSignedDecimalFixedPoint
Converts a DecimalFixedPoint to its signed equivalent at the same
totalBits and decimals.
Signed inputs are returned by reference unchanged; unsigned inputs are
accepted as long as their raw value fits the signed range, i.e.
raw <= 2 ** (totalBits - 1) - 1.
Throws SOLANA_ERROR__FIXED_POINTS__VALUE_OUT_OF_RANGE when the input's
raw value exceeds the maximum representable signed value at its
totalBits.
Type Parameters
| Type Parameter |
|---|
TTotalBits extends number |
TDecimals extends number |
Parameters
| Parameter | Type |
|---|---|
value | DecimalFixedPoint<Signedness, TTotalBits, TDecimals> |
Returns
DecimalFixedPoint<"signed", TTotalBits, TDecimals>