absoluteBinaryFixedPoint
Returns the absolute value of a BinaryFixedPoint. 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 |
TFractionalBits extends number |
Parameters
| Parameter | Type |
|---|---|
a | BinaryFixedPoint<TSignedness, TTotalBits, TFractionalBits> |
Returns
BinaryFixedPoint<TSignedness, TTotalBits, TFractionalBits>