Share via


Math.Max Method

Definition

Overloads

Max(Single, Single)

Returns the greater of two float values.

Max(Int64, Int64)

Returns the greater of two long values.

Max(Int32, Int32)

Returns the greater of two int values.

Max(Double, Double)

Returns the greater of two double values.

Max(Single, Single)

Returns the greater of two float values.

[Android.Runtime.Register("max", "(FF)F", "")]
public static float Max (float a, float b);
[<Android.Runtime.Register("max", "(FF)F", "")>]
static member Max : single * single -> single

Parameters

a
Single

an argument.

b
Single

another argument.

Returns

the larger of a and b.

Attributes

Remarks

Java documentation for java.lang.Math.max(float, float).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

Max(Int64, Int64)

Returns the greater of two long values.

[Android.Runtime.Register("max", "(JJ)J", "")]
public static long Max (long a, long b);
[<Android.Runtime.Register("max", "(JJ)J", "")>]
static member Max : int64 * int64 -> int64

Parameters

a
Int64

an argument.

b
Int64

another argument.

Returns

the larger of a and b.

Attributes

Remarks

Java documentation for java.lang.Math.max(long, long).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

Max(Int32, Int32)

Returns the greater of two int values.

[Android.Runtime.Register("max", "(II)I", "")]
public static int Max (int a, int b);
[<Android.Runtime.Register("max", "(II)I", "")>]
static member Max : int * int -> int

Parameters

a
Int32

an argument.

b
Int32

another argument.

Returns

the larger of a and b.

Attributes

Remarks

Java documentation for java.lang.Math.max(int, int).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

Max(Double, Double)

Returns the greater of two double values.

[Android.Runtime.Register("max", "(DD)D", "")]
public static double Max (double a, double b);
[<Android.Runtime.Register("max", "(DD)D", "")>]
static member Max : double * double -> double

Parameters

a
Double

an argument.

b
Double

another argument.

Returns

the larger of a and b.

Attributes

Remarks

Java documentation for java.lang.Math.max(double, double).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to