docs.unity.cn
    Show / Hide Table of Contents

    Method lzcnt

    lzcnt(Int32)

    Returns the componentwise number of leading zeros in the binary representations of an int vector.

    Declaration
    public static int lzcnt(int x)
    Parameters
    Type Name Description
    Int32 x

    Input value.

    Returns
    Type Description
    Int32

    The number of leading zeros of the input.

    lzcnt(int2)

    Returns the componentwise number of leading zeros in the binary representations of an int2 vector.

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

    Input value.

    Returns
    Type Description
    int2

    The componentwise number of leading zeros of the input.

    lzcnt(int3)

    Returns the componentwise number of leading zeros in the binary representations of an int3 vector.

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

    Input value.

    Returns
    Type Description
    int3

    The componentwise number of leading zeros of the input.

    lzcnt(int4)

    Returns the componentwise number of leading zeros in the binary representations of an int4 vector.

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

    Input value.

    Returns
    Type Description
    int4

    The componentwise number of leading zeros of the input.

    lzcnt(UInt32)

    Returns number of leading zeros in the binary representations of a uint value.

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

    Input value.

    Returns
    Type Description
    Int32

    The number of leading zeros of the input.

    lzcnt(uint2)

    Returns the componentwise number of leading zeros in the binary representations of a uint2 vector.

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

    Input value.

    Returns
    Type Description
    int2

    The componentwise number of leading zeros of the input.

    lzcnt(uint3)

    Returns the componentwise number of leading zeros in the binary representations of a uint3 vector.

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

    Input value.

    Returns
    Type Description
    int3

    The componentwise number of leading zeros of the input.

    lzcnt(uint4)

    Returns the componentwise number of leading zeros in the binary representations of a uint4 vector.

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

    Input value.

    Returns
    Type Description
    int4

    The componentwise number of leading zeros of the input.

    lzcnt(Int64)

    Returns number of leading zeros in the binary representations of a long value.

    Declaration
    public static int lzcnt(long x)
    Parameters
    Type Name Description
    Int64 x

    Input value.

    Returns
    Type Description
    Int32

    The number of leading zeros of the input.

    lzcnt(UInt64)

    Returns number of leading zeros in the binary representations of a ulong value.

    Declaration
    public static int lzcnt(ulong x)
    Parameters
    Type Name Description
    UInt64 x

    Input value.

    Returns
    Type Description
    Int32

    The number of leading zeros of the input.

    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023