min

2.x

int min(value1,value2)

The min macro compares two values and returns the value of the smaller one. The data type can be any numerical data type, signed or unsigned. The type of the arguments and the return value is the same.

Parameters

value1

Specifies the first of two values.

value2

Specifies the second of two values.

Return Value

The return value is value1 or value2, whichever is smaller.

Comments

The min macro is defined in WINDOWS.H as follows:

#define min(a, b)  (((a) < (b)) ? (a) : (b))

See Also

max