mirror of
https://github.com/josdejong/mathjs.git
synced 2026-01-25 15:07:57 +00:00
1.3 KiB
1.3 KiB
| layout |
|---|
| default |
Function not #
Logical not. Flips boolean value of a given parameter.
For matrices, the function is evaluated element wise.
Syntax #
math.not(x)
Parameters #
| Parameter | Type | Description |
|---|---|---|
x |
number | BigNumber | Complex | Unit | Array | Matrix | First value to check |
Returns #
| Type | Description |
|---|---|
| boolean | Array | Matrix | Returns true when input is a zero or empty value. |
Examples #
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]