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