2022-07-25 10:14:12 +02:00

1.1 KiB

layout
default

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 #

math.hex(240) // returns "0xF0"

See also #

oct, bin