docs.unity3d.com
    Show / Hide Table of Contents

    Method normalize

    normalize(float2)

    Returns a normalized version of the float2 vector x by scaling it by 1 / length(x).

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

    Vector to normalize.

    Returns
    Type Description
    float2

    The normalized vector.

    normalize(float3)

    Returns a normalized version of the float3 vector x by scaling it by 1 / length(x).

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

    Vector to normalize.

    Returns
    Type Description
    float3

    The normalized vector.

    normalize(float4)

    Returns a normalized version of the float4 vector x by scaling it by 1 / length(x).

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

    Vector to normalize.

    Returns
    Type Description
    float4

    The normalized vector.

    normalize(double2)

    Returns a normalized version of the double2 vector x by scaling it by 1 / length(x).

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

    Vector to normalize.

    Returns
    Type Description
    double2

    The normalized vector.

    normalize(double3)

    Returns a normalized version of the double3 vector x by scaling it by 1 / length(x).

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

    Vector to normalize.

    Returns
    Type Description
    double3

    The normalized vector.

    normalize(double4)

    Returns a normalized version of the double4 vector x by scaling it by 1 / length(x).

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

    Vector to normalize.

    Returns
    Type Description
    double4

    The normalized vector.

    normalize(quaternion)

    Returns a normalized version of a quaternion q by scaling it by 1 / length(q).

    Declaration
    public static quaternion normalize(quaternion q)
    Parameters
    Type Name Description
    quaternion q

    The quaternion to normalize.

    Returns
    Type Description
    quaternion

    The normalized quaternion.

    In This Article
    • normalize(float2)
    • normalize(float3)
    • normalize(float4)
    • normalize(double2)
    • normalize(double3)
    • normalize(double4)
    • normalize(quaternion)
    Back to top
    Terms of use
    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