Xojo.Math.Max

From Xojo Documentation

Method

Xojo.Math.Max(value1 As Double, value2 As Double, ParamArray moreValues As Double) As Double

Supported for all project types and targets.

Returns the maximum value out of all the values passed in as parameters.

Sample Code

Calculates the maximum of multiple values:

Using Xojo.Math

Dim d As Double
d = Max(3.01, 4.05) // d = 4.05

d = Max(3.012, 3.011, 1.56) // d = 3.012

Dim i As Integer
i = Max(4, 8, 1, 9, 13, 11, 4) // i = 13