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

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

    math.trunc

    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 float trunc(float x);

    Parameters

    Parameter Description
    x Input value.

    Returns

    float The truncation of the input.

    Description

    Returns the result of truncating a float value to an integral float value.


    Declaration

    public static float2 trunc(float2 x);

    Parameters

    Parameter Description
    x Input value.

    Returns

    float2 The componentwise truncation of the input.

    Description

    Returns the result of a componentwise truncation of a float2 value to an integral float2 value.


    Declaration

    public static float3 trunc(float3 x);

    Parameters

    Parameter Description
    x Input value.

    Returns

    float3 The componentwise truncation of the input.

    Description

    Returns the result of a componentwise truncation of a float3 value to an integral float3 value.


    Declaration

    public static float4 trunc(float4 x);

    Parameters

    Parameter Description
    x Input value.

    Returns

    float4 The componentwise truncation of the input.

    Description

    Returns the result of a componentwise truncation of a float4 value to an integral float4 value.


    Declaration

    public static double trunc(double x);

    Parameters

    Parameter Description
    x Input value.

    Returns

    double The truncation of the input.

    Description

    Returns the result of truncating a double value to an integral double value.


    Declaration

    public static double2 trunc(double2 x);

    Parameters

    Parameter Description
    x Input value.

    Returns

    double2 The componentwise truncation of the input.

    Description

    Returns the result of a componentwise truncation of a double2 value to an integral double2 value.


    Declaration

    public static double3 trunc(double3 x);

    Parameters

    Parameter Description
    x Input value.

    Returns

    double3 The componentwise truncation of the input.

    Description

    Returns the result of a componentwise truncation of a double3 value to an integral double3 value.


    Declaration

    public static double4 trunc(double4 x);

    Parameters

    Parameter Description
    x Input value.

    Returns

    double4 The componentwise truncation of the input.

    Description

    Returns the result of a componentwise truncation of a double4 value to an integral double4 value.


    Web Proxy Viewer  |  New URL  |  Original Page