docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method cmax

    | Improve this Doc View Source

    cmax(int2)

    Returns the maximum component of an int2 vector.

    Declaration
    public static int cmax(int2 x)
    Parameters
    Type Name Description
    int2 x

    The vector to use when computing the maximum component.

    Returns
    Type Description
    int

    The value of the maximum component of the vector.

    | Improve this Doc View Source

    cmax(int3)

    Returns the maximum component of an int3 vector.

    Declaration
    public static int cmax(int3 x)
    Parameters
    Type Name Description
    int3 x

    The vector to use when computing the maximum component.

    Returns
    Type Description
    int

    The value of the maximum component of the vector.

    | Improve this Doc View Source

    cmax(int4)

    Returns the maximum component of an int4 vector.

    Declaration
    public static int cmax(int4 x)
    Parameters
    Type Name Description
    int4 x

    The vector to use when computing the maximum component.

    Returns
    Type Description
    int

    The value of the maximum component of the vector.

    | Improve this Doc View Source

    cmax(uint2)

    Returns the maximum component of a uint2 vector.

    Declaration
    public static uint cmax(uint2 x)
    Parameters
    Type Name Description
    uint2 x

    The vector to use when computing the maximum component.

    Returns
    Type Description
    uint

    The value of the maximum component of the vector.

    | Improve this Doc View Source

    cmax(uint3)

    Returns the maximum component of a uint3 vector.

    Declaration
    public static uint cmax(uint3 x)
    Parameters
    Type Name Description
    uint3 x

    The vector to use when computing the maximum component.

    Returns
    Type Description
    uint

    The value of the maximum component of the vector.

    | Improve this Doc View Source

    cmax(uint4)

    Returns the maximum component of a uint4 vector.

    Declaration
    public static uint cmax(uint4 x)
    Parameters
    Type Name Description
    uint4 x

    The vector to use when computing the maximum component.

    Returns
    Type Description
    uint

    The value of the maximum component of the vector.

    | Improve this Doc View Source

    cmax(float2)

    Returns the maximum component of a float2 vector.

    Declaration
    public static float cmax(float2 x)
    Parameters
    Type Name Description
    float2 x

    The vector to use when computing the maximum component.

    Returns
    Type Description
    float

    The value of the maximum component of the vector.

    | Improve this Doc View Source

    cmax(float3)

    Returns the maximum component of a float3 vector.

    Declaration
    public static float cmax(float3 x)
    Parameters
    Type Name Description
    float3 x

    The vector to use when computing the maximum component.

    Returns
    Type Description
    float

    The value of the maximum component of the vector.

    | Improve this Doc View Source

    cmax(float4)

    Returns the maximum component of a float4 vector.

    Declaration
    public static float cmax(float4 x)
    Parameters
    Type Name Description
    float4 x

    The vector to use when computing the maximum component.

    Returns
    Type Description
    float

    The value of the maximum component of the vector.

    | Improve this Doc View Source

    cmax(double2)

    Returns the maximum component of a double2 vector.

    Declaration
    public static double cmax(double2 x)
    Parameters
    Type Name Description
    double2 x

    The vector to use when computing the maximum component.

    Returns
    Type Description
    double

    The value of the maximum component of the vector.

    | Improve this Doc View Source

    cmax(double3)

    Returns the maximum component of a double3 vector.

    Declaration
    public static double cmax(double3 x)
    Parameters
    Type Name Description
    double3 x

    The vector to use when computing the maximum component.

    Returns
    Type Description
    double

    The value of the maximum component of the vector.

    | Improve this Doc View Source

    cmax(double4)

    Returns the maximum component of a double4 vector.

    Declaration
    public static double cmax(double4 x)
    Parameters
    Type Name Description
    double4 x

    The vector to use when computing the maximum component.

    Returns
    Type Description
    double

    The value of the maximum component of the vector.

    • Improve this Doc
    • View Source
    In This Article
    Back to top
    Copyright © 2026 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)