Equinox Online Help - Language Reference - A to Z

Home

MinMax

Applies to
SyntaxMinmax(LowExpression, NumberExpression, HighExpression)
Action[Function] Determines if a given number is in a given range.
ScopeUsable anywhere.
Notes

This function tests NumberExpression to determine if it is in the range LowExpression to HighExpression. If NumberExpression is in the given range then its value is returned. If number is larger than HighExpression, then HighExpression is returned. If number is smaller than LowExpression, then LowExpression is returned.

CategoryMaths
See Also Abs, Acos, Asin, Atan, Cos, Deg, Int, Log, Max, Min, MinMax, Rad, Rnd, RndStart, Round, Sign, Sin, Sqrt, Tan
Example

All of the following statements print the number 1 in the Print window.

Print Minmax(.5, 1, 1.5)
Print Minmax(1, .5, 2)
Print Minmax(0, 2, 1)