참고: 이 페이지는 아직 한국어로 번역되지 않았습니다. 아래는 영어 원문입니다.
function toTwos(_value, _width): bigint
Convert value to a twos-compliment representation of width bits. The result will always be positive.

Parameters

ParameterTypeDescription
_valueBigNumberishThe value to convert.
_widthNumericThe width of the value in bits.

Returns

bigint The value.

Throws

If the value is too large for the width.

Source

utils/maths.ts:72