docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method ceillog2

    ceillog2(int)

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

    Declaration
    public static int ceillog2(int x)
    Parameters
    Type Name Description
    int x

    Integer to be used as input.

    Returns
    Type Description
    int

    Ceiling of the base-2 logarithm of x, as an integer.

    Remarks

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

    ceillog2(int2)

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

    Declaration
    public static int2 ceillog2(int2 x)
    Parameters
    Type Name Description
    int2 x

    int2 to be used as input.

    Returns
    Type Description
    int2

    Componentwise ceiling of the base-2 logarithm of x.

    Remarks

    Components of x must be greater than 0, otherwise the result for that component is undefined.

    ceillog2(int3)

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

    Declaration
    public static int3 ceillog2(int3 x)
    Parameters
    Type Name Description
    int3 x

    int3 to be used as input.

    Returns
    Type Description
    int3

    Componentwise ceiling of the base-2 logarithm of x.

    Remarks

    Components of x must be greater than 0, otherwise the result for that component is undefined.

    ceillog2(int4)

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

    Declaration
    public static int4 ceillog2(int4 x)
    Parameters
    Type Name Description
    int4 x

    int4 to be used as input.

    Returns
    Type Description
    int4

    Componentwise ceiling of the base-2 logarithm of x.

    Remarks

    Components of x must be greater than 0, otherwise the result for that component is undefined.

    ceillog2(uint)

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

    Declaration
    public static int ceillog2(uint x)
    Parameters
    Type Name Description
    uint x

    Unsigned integer to be used as input.

    Returns
    Type Description
    int

    Ceiling of the base-2 logarithm of x, as an integer.

    Remarks

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

    ceillog2(uint2)

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

    Declaration
    public static int2 ceillog2(uint2 x)
    Parameters
    Type Name Description
    uint2 x

    uint2 to be used as input.

    Returns
    Type Description
    int2

    Componentwise ceiling of the base-2 logarithm of x.

    Remarks

    Components of x must be greater than 0, otherwise the result for that component is undefined.

    ceillog2(uint3)

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

    Declaration
    public static int3 ceillog2(uint3 x)
    Parameters
    Type Name Description
    uint3 x

    uint3 to be used as input.

    Returns
    Type Description
    int3

    Componentwise ceiling of the base-2 logarithm of x.

    Remarks

    Components of x must be greater than 0, otherwise the result for that component is undefined.

    ceillog2(uint4)

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

    Declaration
    public static int4 ceillog2(uint4 x)
    Parameters
    Type Name Description
    uint4 x

    uint4 to be used as input.

    Returns
    Type Description
    int4

    Componentwise ceiling of the base-2 logarithm of x.

    Remarks

    Components of x must be greater than 0, otherwise the result for that component is undefined.

    In This Article
    Back to top
    Copyright © 2024 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)