fixedUIntBigFrom
fixedUIntBigFrom(
value,bitWidth,mode?):bigint
Defined in: packages/math-numbers/src/fixed-int-big/fixed-uint-big-from.ts:23
Brings an arbitrary bigint into a bitWidth-bit unsigned integer under
mode.
Every unsigned operation in this directory ends here, for the same reason
fixedSIntBigFrom collects the signed ones: the exact bigint result
cannot overflow, so the policy applies once, at the end.
Parameters
Section titled “Parameters”bigint
The exact value to fit.
bitWidth
Section titled “bitWidth”number
Width of the integer, in bits.
OverflowMode = numericConfig.defaultOverflowMode
Overflow policy. Defaults to
numericConfig.defaultOverflowMode.
Returns
Section titled “Returns”bigint
value itself when it already fits, and otherwise the wrapped,
clamped or (for abort) never-returned result.
Throws
Section titled “Throws”When bitWidth is not a non-negative safe integer.
Throws
Section titled “Throws”When value does not fit and mode is abort.