absoluteDecimalFixedPoint
Returns the absolute value of a DecimalFixedPoint. Unsigned inputs are returned unchanged.
Throws SOLANA_ERROR__FIXED_POINTS__ARITHMETIC_OVERFLOW when taking the
absolute value of the minimum representable signed value, which has no
positive counterpart in two's-complement.
Type Parameters
| Type Parameter |
|---|
TSignedness extends Signedness |
TTotalBits extends number |
TDecimals extends number |
Parameters
| Parameter | Type |
|---|---|
a | DecimalFixedPoint<TSignedness, TTotalBits, TDecimals> |
Returns
DecimalFixedPoint<TSignedness, TTotalBits, TDecimals>