Lua BitOps: Difference between revisions
From Spring
Jump to navigationJump to search
No edit summary |
fix category |
||
| Line 16: | Line 16: | ||
'''math.bit_bits''' <font color=#55ee99> (result = result | (1 << aX);)</font> | '''math.bit_bits''' <font color=#55ee99> (result = result | (1 << aX);)</font> | ||
( int a1 [, int a2 [, ... ] ] ) -> int i | ( int a1 [, int a2 [, ... ] ] ) -> int i | ||
[[category: Lua]] | |||
Revision as of 11:51, 13 March 2010
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 << aX);)
( int a1 [, int a2 [, ... ] ] ) -> int i