Xojo.Math.Max

From Xojo Documentation

Revision as of 21:44, 30 October 2020 by Gperlman (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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