[ Web Proxy ]
URL:
Viewing: https://docs.unity3d.com/ScriptReference/Unity.Mathematics.math-project.html [Back]  [Original]

Unity - Scripting API: Unity.Mathematics.math.project
Version: Unity 6.5 (6000.5)
    • Supported
    • Legacy
    LanguageEnglish
    • C#

    math.project

    Suggest a change

    Success!

    Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

    Close

    Submission failed

    For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

    Close
    Your name Your email Suggestion* Submit suggestion

    Cancel

    Declaration

    public static float2 project(float2 a, float2 ontoB);

    Parameters

    Parameter Description
    a Vector to project.
    ontoB Non-zero vector to project onto.

    Returns

    float2 Vector projection of a onto b.

    Description

    Compute vector projection of a onto b.

    Some finite vectors a and b could generate a non-finite result. This is most likely when a's components are very large (close to Single.MaxValue) or when b's components are very small (close to FLT_MIN_NORMAL). In these cases, you can call math.projectsafe which will use a given default value if the result is not finite.


    Declaration

    public static float3 project(float3 a, float3 ontoB);

    Parameters

    Parameter Description
    a Vector to project.
    ontoB Non-zero vector to project onto.

    Returns

    float3 Vector projection of a onto b.

    Description

    Compute vector projection of a onto b.

    Some finite vectors a and b could generate a non-finite result. This is most likely when a's components are very large (close to Single.MaxValue) or when b's components are very small (close to FLT_MIN_NORMAL). In these cases, you can call math.projectsafe which will use a given default value if the result is not finite.


    Declaration

    public static float4 project(float4 a, float4 ontoB);

    Parameters

    Parameter Description
    a Vector to project.
    ontoB Non-zero vector to project onto.

    Returns

    float4 Vector projection of a onto b.

    Description

    Compute vector projection of a onto b.

    Some finite vectors a and b could generate a non-finite result. This is most likely when a's components are very large (close to Single.MaxValue) or when b's components are very small (close to FLT_MIN_NORMAL). In these cases, you can call math.projectsafe which will use a given default value if the result is not finite.


    Declaration

    public static double2 project(double2 a, double2 ontoB);

    Parameters

    Parameter Description
    a Vector to project.
    ontoB Non-zero vector to project onto.

    Returns

    double2 Vector projection of a onto b.

    Description

    Compute vector projection of a onto b.

    Some finite vectors a and b could generate a non-finite result. This is most likely when a's components are very large (close to Double.MaxValue) or when b's components are very small (close to DBL_MIN_NORMAL). In these cases, you can call math.projectsafe which will use a given default value if the result is not finite.


    Declaration

    public static double3 project(double3 a, double3 ontoB);

    Parameters

    Parameter Description
    a Vector to project.
    ontoB Non-zero vector to project onto.

    Returns

    double3 Vector projection of a onto b.

    Description

    Compute vector projection of a onto b.

    Some finite vectors a and b could generate a non-finite result. This is most likely when a's components are very large (close to Double.MaxValue) or when b's components are very small (close to DBL_MIN_NORMAL). In these cases, you can call math.projectsafe which will use a given default value if the result is not finite.


    Declaration

    public static double4 project(double4 a, double4 ontoB);

    Parameters

    Parameter Description
    a Vector to project.
    ontoB Non-zero vector to project onto.

    Returns

    double4 Vector projection of a onto b.

    Description

    Compute vector projection of a onto b.

    Some finite vectors a and b could generate a non-finite result. This is most likely when a's components are very large (close to Double.MaxValue) or when b's components are very small (close to DBL_MIN_NORMAL). In these cases, you can call math.projectsafe which will use a given default value if the result is not finite.


    Web Proxy Viewer  |  New URL  |  Original Page