bit.mod
Lua function bit.mod Summary Bitwise 'modulus' (remainder after integer divide) Prototype `n = bit.mod (a, b)` Description `This takes two arguments. Both are converted to signed 'long long' (64-bit integers). The result is modulus - the remainder after doing an integer divide of the first argument by the second argument. eg.
    print (bit.mod (17, 4))  --> 1
` See Also ... Topics Lua base functions Lua bc (big number) functions Lua bit manipulation functions Lua coroutine functions Lua debug functions Lua io functions Lua math functions Lua os functions Lua package functions Lua PCRE regular expression functions Lua script extensions Lua string functions Lua table functions Lua utilities Scripting Lua functions bit.ashr (Shifts a number right, preserving sign) bit.band (Bitwise 'and') bit.bor (Bitwise 'or') bit.neg (Bitwise negate (ones complement)) bit.shl (Shifts a number left) bit.shr (Shifts a number right) bit.tonumber (Convert a string into a number) bit.tostring (Convert a number into a string) bit.xor (Bitwise 'exclusive or') (Help topic: lua=bit.mod) Documentation contents page