SHIP:Sail:min

From Serious Documentation
Jump to: navigation, search
Function Returns Introduced Description
min Integer/Float v4.0 Gets the minimum value of two or more numbers

The ability to use Floats with this function was introduced in SHIP Version 5.0.

See Also:

Prototype

Integer min(Integer n1, Integer n2);

Integer min(Integer n1, Integer n2, Integer n3);

Float min(Integer/Float n1, Integer/Float n2);

Float min(Integer/Float n1, Integer/Float n2, Integer/Float n3);

Parameters/Return Value

Parameter Data Type Description
n1 Integer/Float The first of a set of numbers to find the minimum of
n2 Integer/Float The second of a set of numbers to find the minimum of
n3 Integer/Float The third of a set of numbers to find the minimum of
Return Integer/Float the minimum of the supplied numbers; if any parameter is a Float, the result will be a Float

Detailed Description

The min() function returns the minimum value of the set of specified numbers.

Examples

Example Result Notes
min(-5,-6); -6
min(-5, 2, 12); -5
min(0, 6, 5); 0