MathExt: Max

Max

Returns the maximum of two values.



 Public Function Max(
	  ByRef x As Variant,
	  ByRef y As Variant ) As Variant

Parameters

x
[ByRef] Variant. Value to test as potential max value.
y
[ByRef] Variant. Value to test as potential max value.

Return Values

Variant -  The max value.

Remarks

No type checking is performed to determine the maximum of two values given. A string compared to an integer is a legal pair of values to test. The only type checked is for an IComparable object. If x is an IComparable, then the object is used to test for the maximum value.

If both values are equavalent then x is returned.

See Also

Project VBCorLib Overview Class MathExt Overview MathExt Properties MathExt Methods lshift MaxIn