Returns the larger of two single-precision floating-point numbers.
Syntax
[System.Runtime.ConstrainedExecution.ReliabilityContract(System.Runtime.ConstrainedExecution.Consistency.WillNotCorruptState, System.Runtime.ConstrainedExecution.Cer.Success)]
public static
float Max (
float val1,
float val2)
Parameters
- val1
-
The first of two single-precision floating-point numbers to compare.
- val2
-
The second of two single-precision floating-point numbers to compare.
Returns
Parameter val1 or val2, whichever is larger. If val1, or val2, or both val1 and val2 are equal to float.NaN, float.NaN is returned.
Remarks
Requirements
Namespace: System
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0, 4.0.0.0