rawBinaryFixedPoint
Returns a factory that constructs BinaryFixedPoint values from a
raw bigint in the smallest representable unit (i.e. already scaled by
2 ** fractionalBits).
The outer call validates the shape parameters once and the returned factory can be called many times to construct values of that shape.
The raw value is range-checked against the claimed totalBits and
signedness; no rounding is ever required.
Type Parameters
| Type Parameter |
|---|
TSignedness extends Signedness |
TTotalBits extends number |
TFractionalBits extends number |
Parameters
| Parameter | Type |
|---|---|
signedness | TSignedness |
totalBits | TTotalBits |
fractionalBits | TFractionalBits |
Returns
Parameters
| Parameter | Type |
|---|---|
raw | bigint |
Returns
BinaryFixedPoint<TSignedness, TTotalBits, TFractionalBits>