Bit
bdiv
<int> bit.bdiv(<uint> dividend, <uint> divisor)
Divides dividend by divisor, remainder is not returned.
badd
<int> bit.badd(<uint> a, <uint> b)
Adds a with b, allows overflows (unlike normal lua).
bsub
<int> bit.bsub(<uint> a, <uint> b)
Subtracts a with b, allows overflows (unlike normal lua).
band
<int> bit.band(<uint> val, <uint> by)
Does a logical AND (&) on val using by.
bor
<int> bit.bor(<uint> val, <uint> by)
Does a logical OR (|) on val using by.
bxor
<int> bit.bxor(<uint> val, <uint> by)
Does a logical XOR (⊕) on val using by.
bnot
<int> bit.bnot(<uint> val)
Does a logical NOT on val.
bmul
<int> bit.bmul(<uint> val, <uint> by)
Multiplies val using by, allows overflows (unlike normal lua)
bswap
<int> bit.bswap(<uint> val)
Does a bitwise swap on val.
ror
<int> bit.ror(<uint> val, <uint> by)
Rotates right val using by.
rol
<int> bit.rol(<int> value, <int> shiftCount)
Returns the left rotated value.
tohex
<string> bit.tohex(<uint> val)
Converts val to a hex string.
tobit
<int> bit.tobit(<uint> val)
Converts val into proper form for bitwise operations.
lshift
<int> bit.lshift(<uint> val, <uint> by)
Does a left shift on val using by.
rshift
<int> bit.rshift(<uint> val, <uint> by)
Does a right shift on val using by.
arshift
<int> bit.arshift(<int> value, <int> shiftCount)
Returns the arithmetically shifted value.