bit. tobit Synchronous
Normalize a number to the unsigned 32-bit value used by this library. Use it before comparing a value that may have come from signed arithmetic or a larger numeric range.
Luau
bit.tobit(value: number) -> numberParameters
| Parameter | Type | Description |
|---|---|---|
value | number | Finite number to truncate and reduce modulo 2^32. |
Returns
numberAn unsigned 32-bit result represented as a Luau number.
Differences from Volt
Volt documents its Bit Library setting as disabled by default. Kawaii enables bit by default. Disabling the setting removes the bit global and makes retained function references reject calls.
Availability
Bit is enabled by default. The bit global is removed when disabled, and its operations check the setting.
Example
Luau
print(bit.tobit(-1)) -- 4294967295