u32()

Converts the given number to an unsigned 32-bit integer (`uint32`) by rounding to the nearest whole number and typecasting.

If the number exceeds the range of a `uint32` (0 to 4,294,967,295), it will wrap due to typecasting.

Syntax

u32(value)

Parameters

Parameter Type Description
value Number Numeric value to convert to uint32.

Return Value

Examples

u32(123456.7);       // returns 123457
u32(-1);            // returns 4294967295 (wrap)
u32(5000000000);    // returns 705032704 (wrap)

See also

s8
u8
s16
u16
s32
u32