bit. ror Synchronous
Rotate bits right, moving bits that leave the low end back into the high end. It reverses a left rotation by the same count.
Luau
bit.ror(value: number, count: number) -> numberParameters
| Parameter | Type | Description |
|---|---|---|
value | number | Finite number to truncate and interpret as an unsigned 32-bit value. |
count | number | Shift or rotation count, normalized to 32 bits and masked with 31. Counts 32 and 0 therefore perform the same operation. |
Returns
numberThe resulting unsigned 32-bit value.
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
local value = 0x12345678
print(bit.ror(bit.rol(value, 8), 8) == value) -- true