mathjs
Version:
Math.js is an extensive math library for JavaScript and Node.js. It features a flexible expression parser and offers an integrated solution to work with numbers, big numbers, complex numbers, units, and matrices.
47 lines (29 loc) • 930 B
Markdown
Bitwise NOT value, `~x`.
For matrices, the function is evaluated element wise.
For units, the function is evaluated on the best prefix base.
```js
math.bitNot(x)
```
Parameter | Type | Description
--------- | ---- | -----------
`x` | Number &
Type | Description
---- | -----------
Number &
```js
math.bitNot(1); // returns Number -2
math.bitNot([2, -3, 4]); // returns Array [-3, 2, 5]
```
[](bitAnd.md),
[](bitOr.md),
[](bitXor.md),
[](leftShift.md),
[](rightArithShift.md),
[](rightLogShift.md)
<!-- Note: This file is automatically generated from source code comments. Changes made in this file will be overridden. -->