bit. tobit Synchronous
Truncate a finite number and wrap it into the unsigned 32-bit range. Use it to normalize a value before fixed-width calculations.
Luau
bit.tobit(value: number) -> numberParameters
| Parameter | Type | Description |
|---|---|---|
value | number | Numeric value to convert. |
Returns
numberAn unsigned 32-bit value stored 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(4294967297)) -- 1
print(bit.tobit(3.9)) -- 3