divideDecimalFixedPoint
Divides a DecimalFixedPoint by a scalar.
The second operand may be another DecimalFixedPoint with the
same signedness (any total bits or decimals) or a bare bigint. The
result always has a's shape.
The optional RoundingMode is consulted whenever the division is
inexact; it defaults to 'strict' and throws
SOLANA_ERROR__FIXED_POINTS__STRICT_MODE_PRECISION_LOSS in that case.
A zero divisor always throws
SOLANA_ERROR__FIXED_POINTS__DIVISION_BY_ZERO.
Type Parameters
| Type Parameter |
|---|
TSignedness extends Signedness |
TTotalBits extends number |
TDecimals extends number |
Parameters
| Parameter | Type |
|---|---|
a | DecimalFixedPoint<TSignedness, TTotalBits, TDecimals> |
b | | bigint | DecimalFixedPoint<NoInfer<TSignedness>, number, number> |
rounding? | RoundingMode |
Returns
DecimalFixedPoint<TSignedness, TTotalBits, TDecimals>