Difference between revisions of "Bit32.countrz"

From GiderosMobile
m (Text replacement - "<source" to "<syntaxhighlight")
m (Text replacement - "</source>" to "</syntaxhighlight>")
 
Line 7: Line 7:
 
<syntaxhighlight lang="lua">
 
<syntaxhighlight lang="lua">
 
(number) = bit32.countrz(n)
 
(number) = bit32.countrz(n)
</source>
+
</syntaxhighlight>
  
 
=== Parameters ===
 
=== Parameters ===

Latest revision as of 15:27, 13 July 2023

Available since: Gideros 2022.3
Class: bit32

Description

Returns the number of consecutive zero bits in the 32-bit representation of the provided number starting from the right-most (least significant) bit. Returns 32 if the provided number is zero.

(number) = bit32.countrz(n)

Parameters

n: (number) value

Return values

Returns (number) result, returns 32 if the provided number is zero

See also

Bitwise Operators