From Xojo Documentation

You are currently browsing the old Xojo documentation site. Please visit the new Xojo documentation site!
Global Method

Min(value1 as Double, value2 as Double [,...valueN As Double ]) As Double

Supported for all project types and targets.

Returns the smallest of the numbers passed.


Changed 2005r1

result=Min(value1, value2 [,...ValueN])

Part Type Description
result Double The smallest of passed values.
value1 Double The first number for comparison.
value2 Double The second number for comparison.
valueN Double Optional additional parameters. Min requires two parameters but optionally accepts additional parameters.

N is the total number of parameters.


The Min function compares the numbers passed and returns the smallest value.


This example uses the Min function to return the lesser of the two values passed.

Var d As Double
d = Min(3.01, 4.05) // returns 3.01
d = Min(3.012, 3.011) // returns 3.011

See Also

Abs, Ceil, Exp, Floor, Max, Pow, Sqrt functions.