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

46 lines
895 B
Markdown

# Function not
Logical `not`. Flips boolean value of a given parameter.
For matrices, the function is evaluated element wise.
## Syntax
```js
math.not(x)
```
### Parameters
Parameter | Type | Description
--------- | ---- | -----------
`x` | Number | BigNumber | Boolean | Complex | Unit | Array | Matrix | null | First value to check
### Returns
Type | Description
---- | -----------
Boolean | Array | Matrix | Returns true when input is a zero or empty value.
## Examples
```js
math.not(2); // returns false
math.not(0); // returns true
math.not(true); // returns false
a = [2, -7, 0];
math.not(a); // returns [false, false, true]
```
## See also
[and](and.md),
[or](or.md),
[xor](xor.md)
<!-- Note: This file is automatically generated from source code comments. Changes made in this file will be overridden. -->