mirror of
https://github.com/josdejong/mathjs.git
synced 2025-12-08 19:46:04 +00:00
673 B
673 B
Function boolean
Create a boolean or convert a string or number to a boolean. In case of a number, true is returned for non-zero numbers, and false in case of zero. Strings can be 'true' or 'false', or can contain a number. When value is a matrix, all elements will be converted to boolean.
Parameters
| Parameter | Type | Description |
|---|---|---|
value |
String | Number | Boolean | Array | Matrix |
Returns
| Type | Description |
|---|---|
| Boolean | Array | Matrix | bool |