min Function

Retrieves the lesser of the two specified values.


anytype min(anytype object1, anytype object2)

Parameter

Description

object1

The first value.

object2

The second value.

The lesser of the two values specified by the object1 and object2 parameters.

  • min(2,33) //Returns 2

static void minExample(Args _arg)
{
    anytype a;
    real r = 3.0;
    real s = 2.0;
    ;
 
    a = min(r, s);
    print num2Str(a, 1, 2, 1, 1) + " is less than the other number.";
 
    pause;
}

Community Additions

ADD
Show: