Min

From Xojo Documentation

Revision as of 19:09, 19 November 2009 by WikiSysop (talk) (1 revision)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)


Description

Returns the smallest of the numbers passed.


Syntax

result=Min(value1,

Changed 2005r1

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
Introduced 2005r1
Double Optional additional parameters. Min requires two parameters but optionally accepts additional parameters.

N is the total number of parameters.


Notes

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


Examples

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

Dim 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.