638 B
638 B
Function hex
Format a number as hexadecimal.
Syntax
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
//the following outputs "0xF0"
math.hex(240)