Lua BitOps

From Spring
Revision as of 18:33, 9 December 2012 by Jk (talk | contribs) (→Bit Operators)
Jump to navigationJump to search

Development < Lua Scripting < Lua BitOps

Bit Operators

math.bit_and

 ( int a1 [, int a2 [, ... ] ] ) -> int i

math.bit_or

 ( int a1 [, int a2 [, ... ] ] ) -> int i

math.bit_xor

 ( int a1 [, int a2 [, ... ] ] ) -> int i

math.bit_inv

 ( int a1 ) -> int i

math.bit_bits (result = result | (1 << a1) | (1 << a2) | ...;)

 ( int a1 [, int a2 [, ... ] ] ) -> int i