Skip to content
Discussion options

You must be logged in to vote

bit32 comes from Lua 5.2, and is the recommended way to perform bit opeations.

CC used to use Lua 5.1, and so didn't have bit32,so had its own bit library. Nowadays, the bit library is just a copy of bit32, but with slightly different function names. There's no reason to use this nowadays.

Lua 5.2 represents all numbers with 64 bit doubles, so can only accurately represent 51-bit integers. We can't have a bit64, as it'd produce some nonsense numbers.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Collinor
Comment options

Answer selected by Collinor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants