Skip to main content

Access

All C++ constants are exposed to your Lua script via a single global table named constants. You access individual values by using the dot (.) or bracket ([]) operator on this table.
Constant Usage Example

Members

This section lists all available C++ constants and macro equivalents exposed within the global constants table. These members provide fixed numerical values, such as maximum/minimum limits for various integer and floating-point types.

Integers

This section lists all available integer-based C++ constant macros.
number
The minimum signed 8-bit integer value.
number
The minimum signed 16-bit integer value.
number
The minimum signed 32-bit integer value.
number
The minimum signed 64-bit integer value.
number
The maximum signed 8-bit integer value.
number
The maximum signed 16-bit integer value.
number
The maximum signed 32-bit integer value.
number
The maximum signed 64-bit integer value.
number
The maximum unsigned 8-bit integer value.
number
The maximum unsigned 16-bit integer value.
number
The maximum unsigned 32-bit integer value.
number
The maximum unsigned 64-bit integer value.

Doubles

This section lists all available double-precision floating-point C++ constant macros.
number
The number of decimal digits of precision.
number
The number of significant decimal digits.
number
The difference between 11 and the least value greater than 11 that is representable in the double format.
number
Indicates the presence of subnormal values (often 11 for present, 00 for absent).
number
The number of base BB digits in the mantissa.
number
The maximum finite representable double-precision floating-point number.
number
The maximum integer such that 1010 raised to this power is representable.
number
The maximum binary exponent such that 22 raised to this power is representable.
number
The minimum positive normalized double-precision floating-point number.
number
The minimum integer such that 1010 raised to this power is a normalized number.
number
The minimum binary exponent such that 22 raised to this power is a normalized number.
number
The base of the exponent (usually 22).
number
The minimum positive unnormalized (subnormal) double-precision floating-point number.

Floats

This section lists all available single-precision floating-point C++ constant macros.
number
The number of decimal digits of precision.
number
The number of significant decimal digits.
number
The difference between 11 and the least value greater than 11 that is representable in the float format.
number
Indicates the presence of subnormal values (often 11 for present, 00 for absent).
number
The number of base BB digits in the mantissa.
number
The maximum finite representable single-precision floating-point number.
number
The maximum integer such that 1010 raised to this power is representable.
number
The maximum binary exponent such that 22 raised to this power is representable.
number
The minimum positive normalized single-precision floating-point number.
number
The minimum integer such that 1010 raised to this power is a normalized number.
number
The minimum binary exponent such that 22 raised to this power is a normalized number.
number
The base of the exponent (usually 22).
number
The minimum positive unnormalized (subnormal) single-precision floating-point number.