Function bitNot #

Bitwise NOT value, ~x. For matrices, the function is evaluated element wise. For units, the function is evaluated on the best prefix base.

Syntax #

math.bitNot(x)

Parameters #

Parameter Type Description
x number | BigNumber | Array | Matrix Value to not

Returns #

Type Description
number | BigNumber | Array | Matrix NOT of x

Throws #

Type | Description —- | ———–

Examples #

math.bitNot(1)               // returns number -2

math.bitNot([2, -3, 4])      // returns Array [-3, 2, -5]

See also #

bitAnd, bitOr, bitXor, leftShift, rightArithShift, rightLogShift

Fork me on GitHub