UNPKG

862 BMarkdownView Raw
1<!-- Note: This file is automatically generated from source code comments. Changes made in this file will be overridden. -->
2
3# Function not
4
5Logical `not`. Flips boolean value of a given parameter.
6For matrices, the function is evaluated element wise.
7
8
9## Syntax
10
11```js
12math.not(x)
13```
14
15### Parameters
16
17Parameter | Type | Description
18--------- | ---- | -----------
19`x` | number &#124; BigNumber &#124; Complex &#124; Unit &#124; Array &#124; Matrix | First value to check
20
21### Returns
22
23Type | Description
24---- | -----------
25boolean &#124; Array &#124; Matrix | Returns true when input is a zero or empty value.
26
27
28## Examples
29
30```js
31math.not(2) // returns false
32math.not(0) // returns true
33math.not(true) // returns false
34
35a = [2, -7, 0]
36math.not(a) // returns [false, false, true]
37```
38
39
40## See also
41
42[and](and.md),
43[or](or.md),
44[xor](xor.md)