Difference between revisions of "Bit.rol"

From GiderosMobile
(Created page with "__NOTOC__ '''Available since:''' Gideros 2013.09<br/> === Description === Returns the bitwise left rotation of its first argument by the number of bits given by the second arg...")
 
Line 4: Line 4:
 
Returns the bitwise left rotation of its first argument by the number of bits given by the second argument. Bits shifted out on one side are shifted back in on the other side.
 
Returns the bitwise left rotation of its first argument by the number of bits given by the second argument. Bits shifted out on one side are shifted back in on the other side.
 
<source lang="lua">
 
<source lang="lua">
(number), = bit.rol(xn,)
+
(number) = bit.rol(x,n)
 
</source>
 
</source>
'''x:''' (number) number to rotate ''''''<br/>
+
'''x''': (number) number to rotate ''''''<br/>
'''n:''' (number) amount of bits to rotate ''''''<br/>
+
'''n''': (number) amount of bits to rotate ''''''<br/>
 
'''Returns''' (number) bitwise left rotation<br/>
 
'''Returns''' (number) bitwise left rotation<br/>

Revision as of 10:16, 23 August 2018

Available since: Gideros 2013.09

Description

Returns the bitwise left rotation of its first argument by the number of bits given by the second argument. Bits shifted out on one side are shifted back in on the other side.

(number) = bit.rol(x,n)

'x: (number) number to rotate '
'n: (number) amount of bits to rotate '
Returns (number) bitwise left rotation