다음을 통해 공유


StrictMath.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

Returns the greater of two float values. That is, the result is the argument closer to positive infinity. If the arguments have the same value, the result is that same value. If either value is NaN, then the result is NaN. Unlike the numerical comparison operators, this method considers negative zero to be strictly smaller than positive zero. If one argument is positive zero and the other negative zero, the result is positive zero.

Java documentation for java.lang.StrictMath.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

Returns the greater of two long values. That is, the result is the argument closer to the value of Long#MAX_VALUE. If the arguments have the same value, the result is that same value.

Java documentation for java.lang.StrictMath.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

Returns the greater of two int values. That is, the result is the argument closer to the value of Integer#MAX_VALUE. If the arguments have the same value, the result is that same value.

Java documentation for java.lang.StrictMath.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

Returns the greater of two double values. That is, the result is the argument closer to positive infinity. If the arguments have the same value, the result is that same value. If either value is NaN, then the result is NaN. Unlike the numerical comparison operators, this method considers negative zero to be strictly smaller than positive zero. If one argument is positive zero and the other negative zero, the result is positive zero.

Java documentation for java.lang.StrictMath.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