docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method asint

    asint(uint)

    Returns the bit pattern of a uint as an int.

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

    The uint bits to copy.

    Returns
    Type Description
    int

    The int with the same bit pattern as the input.

    asint(uint2)

    Returns the bit pattern of a uint2 as an int2.

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

    The uint2 bits to copy.

    Returns
    Type Description
    int2

    The int2 with the same bit pattern as the input.

    asint(uint3)

    Returns the bit pattern of a uint3 as an int3.

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

    The uint3 bits to copy.

    Returns
    Type Description
    int3

    The int3 with the same bit pattern as the input.

    asint(uint4)

    Returns the bit pattern of a uint4 as an int4.

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

    The uint4 bits to copy.

    Returns
    Type Description
    int4

    The int4 with the same bit pattern as the input.

    asint(float)

    Returns the bit pattern of a float as an int.

    Declaration
    public static int asint(float x)
    Parameters
    Type Name Description
    float x

    The float bits to copy.

    Returns
    Type Description
    int

    The int with the same bit pattern as the input.

    asint(float2)

    Returns the bit pattern of a float2 as an int2.

    Declaration
    public static int2 asint(float2 x)
    Parameters
    Type Name Description
    float2 x

    The float2 bits to copy.

    Returns
    Type Description
    int2

    The int2 with the same bit pattern as the input.

    asint(float3)

    Returns the bit pattern of a float3 as an int3.

    Declaration
    public static int3 asint(float3 x)
    Parameters
    Type Name Description
    float3 x

    The float3 bits to copy.

    Returns
    Type Description
    int3

    The int3 with the same bit pattern as the input.

    asint(float4)

    Returns the bit pattern of a float4 as an int4.

    Declaration
    public static int4 asint(float4 x)
    Parameters
    Type Name Description
    float4 x

    The float4 bits to copy.

    Returns
    Type Description
    int4

    The int4 with the same bit pattern as the input.

    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)