simple-squiggle/node_modules/mathjs/docs/reference/functions/hex.md

46 lines
638 B
Markdown
Raw Normal View History

<!-- Note: This file is automatically generated from source code comments. Changes made in this file will be overridden. -->
# Function hex
Format a number as hexadecimal.
## Syntax
```js
math.hex(value)
```
### Parameters
Parameter | Type | Description
--------- | ---- | -----------
`value` | number | Value to be stringified
`wordSize` | number | Optional word size (see `format`)
### Returns
Type | Description
---- | -----------
string | The formatted value
### Throws
Type | Description
---- | -----------
## Examples
```js
//the following outputs "0xF0"
math.hex(240)
```
## See also
[oct](oct.md),
[bin](bin.md)