docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method asfloat

    asfloat(int)

    Returns the bit pattern of an int as a float.

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

    The int bits to copy.

    Returns
    Type Description
    float

    The float with the same bit pattern as the input.

    asfloat(int2)

    Returns the bit pattern of an int2 as a float2.

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

    The int2 bits to copy.

    Returns
    Type Description
    float2

    The float2 with the same bit pattern as the input.

    asfloat(int3)

    Returns the bit pattern of an int3 as a float3.

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

    The int3 bits to copy.

    Returns
    Type Description
    float3

    The float3 with the same bit pattern as the input.

    asfloat(int4)

    Returns the bit pattern of an int4 as a float4.

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

    The int4 bits to copy.

    Returns
    Type Description
    float4

    The float4 with the same bit pattern as the input.

    asfloat(uint)

    Returns the bit pattern of a uint as a float.

    Declaration
    public static float asfloat(uint x)
    Parameters
    Type Name Description
    uint x

    The uint bits to copy.

    Returns
    Type Description
    float

    The float with the same bit pattern as the input.

    asfloat(uint2)

    Returns the bit pattern of a uint2 as a float2.

    Declaration
    public static float2 asfloat(uint2 x)
    Parameters
    Type Name Description
    uint2 x

    The uint2 bits to copy.

    Returns
    Type Description
    float2

    The float2 with the same bit pattern as the input.

    asfloat(uint3)

    Returns the bit pattern of a uint3 as a float3.

    Declaration
    public static float3 asfloat(uint3 x)
    Parameters
    Type Name Description
    uint3 x

    The uint3 bits to copy.

    Returns
    Type Description
    float3

    The float3 with the same bit pattern as the input.

    asfloat(uint4)

    Returns the bit pattern of a uint4 as a float4.

    Declaration
    public static float4 asfloat(uint4 x)
    Parameters
    Type Name Description
    uint4 x

    The uint4 bits to copy.

    Returns
    Type Description
    float4

    The float4 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)