docs.unity.cn
    Show / Hide Table of Contents

    Method max

    max(Int32, Int32)

    Returns the maximum of two int values.

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

    The first input value.

    Int32 y

    The second input value.

    Returns
    Type Description
    Int32

    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(UInt32, UInt32)

    Returns the maximum of two uint values.

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

    The first input value.

    UInt32 y

    The second input value.

    Returns
    Type Description
    UInt32

    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(Int64, Int64)

    Returns the maximum of two long values.

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

    The first input value.

    Int64 y

    The second input value.

    Returns
    Type Description
    Int64

    The maximum of the two input values.

    max(UInt64, UInt64)

    Returns the maximum of two ulong values.

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

    The first input value.

    UInt64 y

    The second input value.

    Returns
    Type Description
    UInt64

    The maximum of the two input values.

    max(Single, Single)

    Returns the maximum of two float values.

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

    The first input value.

    Single y

    The second input value.

    Returns
    Type Description
    Single

    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.

    Back to top Copyright © 2022 Unity Technologies
    Generated by DocFX
    on Tuesday, March 29, 2022
    Terms of use