addDecimalFixedPoint
Adds two DecimalFixedPoint values of the same shape and returns the result at the same shape.
Throws SOLANA_ERROR__FIXED_POINTS__SHAPE_MISMATCH if the two operands
differ in signedness, total bits, or decimals, and
SOLANA_ERROR__FIXED_POINTS__ARITHMETIC_OVERFLOW if the sum does not
fit the target shape.
Type Parameters
| Type Parameter |
|---|
TSignedness extends Signedness |
TTotalBits extends number |
TDecimals extends number |
Parameters
| Parameter | Type |
|---|---|
a | DecimalFixedPoint<TSignedness, TTotalBits, TDecimals> |
b | NoInfer<DecimalFixedPoint<TSignedness, TTotalBits, TDecimals>> |
Returns
DecimalFixedPoint<TSignedness, TTotalBits, TDecimals>