Difference between revisions of "Bit.ror"

From GiderosMobile
(Created page with "__NOTOC__ '''Available since:''' Gideros 2013.09<br/> === Description === Returns the bitwise right rotation of its first argument by the number of bits given by the second ar...")
 
Line 4: Line 4:
 
Returns the bitwise right 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 right 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.ror(xn,)
+
(number) = bit.ror(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 right rotation<br/>
 
'''Returns''' (number) bitwise right rotation<br/>

Revision as of 11:16, 23 August 2018

Available since: Gideros 2013.09

Description

Returns the bitwise right 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.ror(x,n)

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