Skip to main content

bit.rol

Returns the bitwise left rotation of its first argument by the number of bits given by the second argument. Bits shifted out on one side are shifted back in on the other side. Only the lower 5 bits of the rotate count are used (reduces to the range [0..31]).

bit.rol(x: number, n: number): number

Arguments

NameDescriptionType
xValuenumber
nNumber of bits to rotate bynumber

Returns number