[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Bit module function names
- From: "Stuart P. Bentley" <stuart@...>
- Date: Fri, 26 Feb 2010 01:57:12 -0800
I like BitOp's naming convention, which uses bit.bnot, bit.band, bit.bor,
and bit.bxor for the bitwise logical operations, but uses bit.shift and
bit.rot (well, rol and ror, which I side with 5.2 as being redundant in
favor of negative operands).
Also, just to confirm, the 5.2 manual states to use arithmetic operators for
arithmetic shifting. That means
function arshift(value, bits)
return value/(2^bits)
end
correct?