Document Library for WPF | ComponentOne
C1.WPF.Document.4.6.2 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 Integer _
    ) As Integer
    public static int log2( 
       int x
    )

    Parameters

    x
    The value to calculate log2 on.

    Return Value

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