2014-12-25 17:05:29 +01:00

930 B

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 | Boolean | Array | Matrix | null Value to not

Returns

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

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