docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method abs

    abs(int)

    Returns the absolute value of a int value.

    Declaration
    public static int abs(int x)
    Parameters
    Type Name Description
    int x

    Input value.

    Returns
    Type Description
    int

    The absolute value of the input.

    abs(int2)

    Returns the componentwise absolute value of a int2 vector.

    Declaration
    public static int2 abs(int2 x)
    Parameters
    Type Name Description
    int2 x

    Input value.

    Returns
    Type Description
    int2

    The componentwise absolute value of the input.

    abs(int3)

    Returns the componentwise absolute value of a int3 vector.

    Declaration
    public static int3 abs(int3 x)
    Parameters
    Type Name Description
    int3 x

    Input value.

    Returns
    Type Description
    int3

    The componentwise absolute value of the input.

    abs(int4)

    Returns the componentwise absolute value of a int4 vector.

    Declaration
    public static int4 abs(int4 x)
    Parameters
    Type Name Description
    int4 x

    Input value.

    Returns
    Type Description
    int4

    The componentwise absolute value of the input.

    abs(long)

    Returns the absolute value of a long value.

    Declaration
    public static long abs(long x)
    Parameters
    Type Name Description
    long x

    Input value.

    Returns
    Type Description
    long

    The absolute value of the input.

    abs(float)

    Returns the absolute value of a float value.

    Declaration
    public static float abs(float x)
    Parameters
    Type Name Description
    float x

    Input value.

    Returns
    Type Description
    float

    The absolute value of the input.

    abs(float2)

    Returns the componentwise absolute value of a float2 vector.

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

    Input value.

    Returns
    Type Description
    float2

    The componentwise absolute value of the input.

    abs(float3)

    Returns the componentwise absolute value of a float3 vector.

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

    Input value.

    Returns
    Type Description
    float3

    The componentwise absolute value of the input.

    abs(float4)

    Returns the componentwise absolute value of a float4 vector.

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

    Input value.

    Returns
    Type Description
    float4

    The componentwise absolute value of the input.

    abs(double)

    Returns the absolute value of a double value.

    Declaration
    public static double abs(double x)
    Parameters
    Type Name Description
    double x

    Input value.

    Returns
    Type Description
    double

    The absolute value of the input.

    abs(double2)

    Returns the componentwise absolute value of a double2 vector.

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

    Input value.

    Returns
    Type Description
    double2

    The componentwise absolute value of the input.

    abs(double3)

    Returns the componentwise absolute value of a double3 vector.

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

    Input value.

    Returns
    Type Description
    double3

    The componentwise absolute value of the input.

    abs(double4)

    Returns the componentwise absolute value of a double4 vector.

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

    Input value.

    Returns
    Type Description
    double4

    The componentwise absolute value of 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)