docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method max

    max(int, int)

    Returns the maximum of two int values.

    Declaration
    public static int max(int x, int y)
    Parameters
    Type Name Description
    int x

    The first input value.

    int y

    The second input value.

    Returns
    Type Description
    int

    The maximum of the two input values.

    max(int2, int2)

    Returns the componentwise maximum of two int2 vectors.

    Declaration
    public static int2 max(int2 x, int2 y)
    Parameters
    Type Name Description
    int2 x

    The first input value.

    int2 y

    The second input value.

    Returns
    Type Description
    int2

    The componentwise maximum of the two input values.

    max(int3, int3)

    Returns the componentwise maximum of two int3 vectors.

    Declaration
    public static int3 max(int3 x, int3 y)
    Parameters
    Type Name Description
    int3 x

    The first input value.

    int3 y

    The second input value.

    Returns
    Type Description
    int3

    The componentwise maximum of the two input values.

    max(int4, int4)

    Returns the componentwise maximum of two int4 vectors.

    Declaration
    public static int4 max(int4 x, int4 y)
    Parameters
    Type Name Description
    int4 x

    The first input value.

    int4 y

    The second input value.

    Returns
    Type Description
    int4

    The componentwise maximum of the two input values.

    max(uint, uint)

    Returns the maximum of two uint values.

    Declaration
    public static uint max(uint x, uint y)
    Parameters
    Type Name Description
    uint x

    The first input value.

    uint y

    The second input value.

    Returns
    Type Description
    uint

    The maximum of the two input values.

    max(uint2, uint2)

    Returns the componentwise maximum of two uint2 vectors.

    Declaration
    public static uint2 max(uint2 x, uint2 y)
    Parameters
    Type Name Description
    uint2 x

    The first input value.

    uint2 y

    The second input value.

    Returns
    Type Description
    uint2

    The componentwise maximum of the two input values.

    max(uint3, uint3)

    Returns the componentwise maximum of two uint3 vectors.

    Declaration
    public static uint3 max(uint3 x, uint3 y)
    Parameters
    Type Name Description
    uint3 x

    The first input value.

    uint3 y

    The second input value.

    Returns
    Type Description
    uint3

    The componentwise maximum of the two input values.

    max(uint4, uint4)

    Returns the componentwise maximum of two uint4 vectors.

    Declaration
    public static uint4 max(uint4 x, uint4 y)
    Parameters
    Type Name Description
    uint4 x

    The first input value.

    uint4 y

    The second input value.

    Returns
    Type Description
    uint4

    The componentwise maximum of the two input values.

    max(long, long)

    Returns the maximum of two long values.

    Declaration
    public static long max(long x, long y)
    Parameters
    Type Name Description
    long x

    The first input value.

    long y

    The second input value.

    Returns
    Type Description
    long

    The maximum of the two input values.

    max(ulong, ulong)

    Returns the maximum of two ulong values.

    Declaration
    public static ulong max(ulong x, ulong y)
    Parameters
    Type Name Description
    ulong x

    The first input value.

    ulong y

    The second input value.

    Returns
    Type Description
    ulong

    The maximum of the two input values.

    max(float, float)

    Returns the maximum of two float values.

    Declaration
    public static float max(float x, float y)
    Parameters
    Type Name Description
    float x

    The first input value.

    float y

    The second input value.

    Returns
    Type Description
    float

    The maximum of the two input values.

    max(float2, float2)

    Returns the componentwise maximum of two float2 vectors.

    Declaration
    public static float2 max(float2 x, float2 y)
    Parameters
    Type Name Description
    float2 x

    The first input value.

    float2 y

    The second input value.

    Returns
    Type Description
    float2

    The componentwise maximum of the two input values.

    max(float3, float3)

    Returns the componentwise maximum of two float3 vectors.

    Declaration
    public static float3 max(float3 x, float3 y)
    Parameters
    Type Name Description
    float3 x

    The first input value.

    float3 y

    The second input value.

    Returns
    Type Description
    float3

    The componentwise maximum of the two input values.

    max(float4, float4)

    Returns the componentwise maximum of two float4 vectors.

    Declaration
    public static float4 max(float4 x, float4 y)
    Parameters
    Type Name Description
    float4 x

    The first input value.

    float4 y

    The second input value.

    Returns
    Type Description
    float4

    The componentwise maximum of the two input values.

    max(double, double)

    Returns the maximum of two double values.

    Declaration
    public static double max(double x, double y)
    Parameters
    Type Name Description
    double x

    The first input value.

    double y

    The second input value.

    Returns
    Type Description
    double

    The maximum of the two input values.

    max(double2, double2)

    Returns the componentwise maximum of two double2 vectors.

    Declaration
    public static double2 max(double2 x, double2 y)
    Parameters
    Type Name Description
    double2 x

    The first input value.

    double2 y

    The second input value.

    Returns
    Type Description
    double2

    The componentwise maximum of the two input values.

    max(double3, double3)

    Returns the componentwise maximum of two double3 vectors.

    Declaration
    public static double3 max(double3 x, double3 y)
    Parameters
    Type Name Description
    double3 x

    The first input value.

    double3 y

    The second input value.

    Returns
    Type Description
    double3

    The componentwise maximum of the two input values.

    max(double4, double4)

    Returns the componentwise maximum of two double4 vectors.

    Declaration
    public static double4 max(double4 x, double4 y)
    Parameters
    Type Name Description
    double4 x

    The first input value.

    double4 y

    The second input value.

    Returns
    Type Description
    double4

    The componentwise maximum of the two input values.

    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)