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...")
 
m (Text replacement - "</source>" to "</syntaxhighlight>")
 
(8 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
__NOTOC__
 
__NOTOC__
'''Available since:''' Gideros 2013.09<br/>
+
<languages />
=== Description ===
+
'''<translate>Available since</translate>:''' Gideros 2013.09<br/>
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.
+
'''<translate>Class</translate>:''' [[Special:MyLanguage/bit|bit]]<br/>
<source lang="lua">
+
=== <translate>Description</translate> ===
(number), = bit.rol(xn,)
+
<translate>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.</translate>
</source>
+
<syntaxhighlight lang="lua">
'''x:''' (number) number to rotate ''''''<br/>
+
(number) = bit.rol(x,n)
'''n:''' (number) amount of bits to rotate ''''''<br/>
+
</syntaxhighlight>
'''Returns''' (number) bitwise left rotation<br/>
+
=== <translate>Parameters</translate> ===
 +
'''x''': (number) <translate>number to rotate</translate> <br/>
 +
'''n''': (number) <translate>amount of bits to rotate</translate> <br/>
 +
=== <translate>Return values</translate> ===
 +
'''<translate>Returns</translate>''' (number) <translate>bitwise left rotation</translate><br/>
 +
 
 +
{{Bit}}

Latest revision as of 14:27, 13 July 2023


Available since: Gideros 2013.09
Class: bit

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)

Parameters

x: (number) number to rotate
n: (number) amount of bits to rotate

Return values

Returns (number) bitwise left rotation