Utils
toTwos
Convert value
to a twos-compliment representation of width
bits.
The result will always be positive.
Parameters
Parameter | Type | Description |
---|---|---|
_value | BigNumberish | The value to convert. |
_width | Numeric | The width of the value in bits. |
Returns
bigint
The value.
Throws
If the value is too large for the width.
Source
Was this page helpful?