MathMax Method (Single, Single) |
Returns the larger of two single-precision floating-point numbers.
Namespace: SystemAssembly: mscorlib (in mscorlib.dll) Version: 4.0.0.0
Syntax public static float Max(
float val1,
float val2
)
Parameters
- val1
- Type: SystemSingle
The first of two single-precision floating-point numbers to compare. - val2
- Type: SystemSingle
The second of two single-precision floating-point numbers to compare.
Return Value
Type:
SingleParameter
val1 or
val2, whichever is larger. If
val1, or
val2, or both
val1 and
val2 are equal to
NaN,
NaN is returned.
See Also