In This Topic
Method that calculates the floor of the log, base 2, of 'x'. The calculation is performed in integer arithmetic, therefore, it is exact.
Syntax
'Declaration
Public Shared Function log2( _
ByVal As Integer _
) As Integer
public static int log2(
int
)
Parameters
- x
- The value to calculate log2 on.
Return Value
floor(log(x)/log(2)), calculated in an exact way.
See Also