docs.unity.cn
    Show / Hide Table of Contents

    Method radians

    radians(Single)

    Returns the result of converting a float value from degrees to radians.

    Declaration
    public static float radians(float x)
    Parameters
    Type Name Description
    Single x

    Angle in degrees.

    Returns
    Type Description
    Single

    Angle converted to radians.

    radians(float2)

    Returns the result of a componentwise conversion of a float2 vector from degrees to radians.

    Declaration
    public static float2 radians(float2 x)
    Parameters
    Type Name Description
    float2 x

    Vector containing angles in degrees.

    Returns
    Type Description
    float2

    Vector containing angles converted to radians.

    radians(float3)

    Returns the result of a componentwise conversion of a float3 vector from degrees to radians.

    Declaration
    public static float3 radians(float3 x)
    Parameters
    Type Name Description
    float3 x

    Vector containing angles in degrees.

    Returns
    Type Description
    float3

    Vector containing angles converted to radians.

    radians(float4)

    Returns the result of a componentwise conversion of a float4 vector from degrees to radians.

    Declaration
    public static float4 radians(float4 x)
    Parameters
    Type Name Description
    float4 x

    Vector containing angles in degrees.

    Returns
    Type Description
    float4

    Vector containing angles converted to radians.

    radians(Double)

    Returns the result of converting a float value from degrees to radians.

    Declaration
    public static double radians(double x)
    Parameters
    Type Name Description
    Double x

    Angle in degrees.

    Returns
    Type Description
    Double

    Angle converted to radians.

    radians(double2)

    Returns the result of a componentwise conversion of a float2 vector from degrees to radians.

    Declaration
    public static double2 radians(double2 x)
    Parameters
    Type Name Description
    double2 x

    Vector containing angles in degrees.

    Returns
    Type Description
    double2

    Vector containing angles converted to radians.

    radians(double3)

    Returns the result of a componentwise conversion of a float3 vector from degrees to radians.

    Declaration
    public static double3 radians(double3 x)
    Parameters
    Type Name Description
    double3 x

    Vector containing angles in degrees.

    Returns
    Type Description
    double3

    Vector containing angles converted to radians.

    radians(double4)

    Returns the result of a componentwise conversion of a float4 vector from degrees to radians.

    Declaration
    public static double4 radians(double4 x)
    Parameters
    Type Name Description
    double4 x

    Vector containing angles in degrees.

    Returns
    Type Description
    double4

    Vector containing angles converted to radians.

    Back to top Copyright © 2022 Unity Technologies
    Generated by DocFX
    on Tuesday, March 29, 2022
    Terms of use