Documents for PDF .NET Edition
GrapeCity.Documents.Imaging Assembly / GrapeCity.Documents.Imaging.jpeg.jj2000.j2k.util Namespace / MathUtil Class / log2 Method
The value to calculate log2 on.

In This Topic
    log2 Method
    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 x As System.Integer _
    ) As System.Integer
    public static System.int log2( 
       System.int x
    )

    Parameters

    x
    The value to calculate log2 on.

    Return Value

    floor(log(x)/log(2)), calculated in an exact way.
    See Also