bit. bdiv Synchronous
Divide successive 32-bit values using integer division. It is useful when interpreting packed counts where fractional values have no meaning.
Luau
bit.bdiv(...values: any) -> numberParameters
| Parameter | Type | Description |
|---|---|---|
...values | any | Values to process in order. Finite numbers are truncated to unsigned 32-bit integers; nonnumeric and nonfinite values are skipped. |
Returns
numberAn unsigned 32-bit result represented as a Luau number.
Usage notes
Arithmetic wraps at 32 bits. With no valid numeric arguments the result is 0, including for AND and multiplication.
A zero divisor resets the running result to 0; it does not raise a divide-by-zero error.
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.bdiv(20, 3)) -- 6