multiplyBinaryFixedPoint
Multiplies a BinaryFixedPoint by a scalar.
The second operand may be another BinaryFixedPoint with the same
signedness (any total bits or fractional bits) or a bare bigint. The
result always has a's shape.
Multiplication by a same-kind fixed-point rescales the product back to
a's scale. When that rescaling is not exact, the optional
RoundingMode is consulted; it defaults to 'strict' and throws
SOLANA_ERROR__FIXED_POINTS__STRICT_MODE_PRECISION_LOSS in that case.
Type Parameters
| Type Parameter |
|---|
TSignedness extends Signedness |
TTotalBits extends number |
TFractionalBits extends number |
Parameters
| Parameter | Type |
|---|---|
a | BinaryFixedPoint<TSignedness, TTotalBits, TFractionalBits> |
b | | bigint | BinaryFixedPoint<NoInfer<TSignedness>, number, number> |
rounding? | RoundingMode |
Returns
BinaryFixedPoint<TSignedness, TTotalBits, TFractionalBits>