[ Web Proxy ]
URL:
Viewing: https://docs.unity3d.com/ScriptReference/Unity.Mathematics.math-floorlog2.html [Back]  [Original]

Unity - Scripting API: Unity.Mathematics.math.floorlog2
Version: Unity 6.5 (6000.5)
    • Supported
    • Legacy
    LanguageEnglish
    • C#

    math.floorlog2

    Suggest a change

    Success!

    Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

    Close

    Submission failed

    For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

    Close
    Your name Your email Suggestion* Submit suggestion

    Cancel

    Declaration

    public static int floorlog2(int x);

    Parameters

    Parameter Description
    x Integer to be used as input.

    Returns

    int Floor of base-2 logarithm of x.

    Description

    Computes the floor of the base-2 logarithm of x.

    x must be greater than zero, otherwise the result is undefined.


    Declaration

    public static int2 floorlog2(int2 x);

    Parameters

    Parameter Description
    x int2 to be used as input.

    Returns

    int2 Componentwise floor of base-2 logarithm of x.

    Description

    Computes the componentwise floor of the base-2 logarithm of x.

    Components of x must be greater than zero, otherwise the result of the component is undefined.


    Declaration

    public static int3 floorlog2(int3 x);

    Parameters

    Parameter Description
    x int3 to be used as input.

    Returns

    int3 Componentwise floor of base-2 logarithm of x.

    Description

    Computes the componentwise floor of the base-2 logarithm of x.

    Components of x must be greater than zero, otherwise the result of the component is undefined.


    Declaration

    public static int4 floorlog2(int4 x);

    Parameters

    Parameter Description
    x int4 to be used as input.

    Returns

    int4 Componentwise floor of base-2 logarithm of x.

    Description

    Computes the componentwise floor of the base-2 logarithm of x.

    Components of x must be greater than zero, otherwise the result of the component is undefined.


    Declaration

    public static int floorlog2(uint x);

    Parameters

    Parameter Description
    x Unsigned integer to be used as input.

    Returns

    int Floor of base-2 logarithm of x.

    Description

    Computes the floor of the base-2 logarithm of x.

    x must be greater than zero, otherwise the result is undefined.


    Declaration

    public static int2 floorlog2(uint2 x);

    Parameters

    Parameter Description
    x uint2 to be used as input.

    Returns

    int2 Componentwise floor of base-2 logarithm of x.

    Description

    Computes the componentwise floor of the base-2 logarithm of x.

    Components of x must be greater than zero, otherwise the result of the component is undefined.


    Declaration

    public static int3 floorlog2(uint3 x);

    Parameters

    Parameter Description
    x uint3 to be used as input.

    Returns

    int3 Componentwise floor of base-2 logarithm of x.

    Description

    Computes the componentwise floor of the base-2 logarithm of x.

    Components of x must be greater than zero, otherwise the result of the component is undefined.


    Declaration

    public static int4 floorlog2(uint4 x);

    Parameters

    Parameter Description
    x uint4 to be used as input.

    Returns

    int4 Componentwise floor of base-2 logarithm of x.

    Description

    Computes the componentwise floor of the base-2 logarithm of x.

    Components of x must be greater than zero, otherwise the result of the component is undefined.


    Web Proxy Viewer  |  New URL  |  Original Page