rawDecimalFixedPoint
Returns a factory that constructs DecimalFixedPoint values from a
raw bigint in the smallest representable unit (i.e. already scaled by
10 ** decimals).
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 |
TDecimals extends number |
Parameters
| Parameter | Type |
|---|---|
signedness | TSignedness |
totalBits | TTotalBits |
decimals | TDecimals |
Returns
Parameters
| Parameter | Type |
|---|---|
raw | bigint |
Returns
DecimalFixedPoint<TSignedness, TTotalBits, TDecimals>