Returns the smaller of two values.
...Math.Min(value_1, value_2 )
Prerequisites
None
Parameters
value_1
A required expression that evaluates to any numerical data type, e.g. Integer, Single, Double.
value_2
A required expression that evaluates to any numerical data type, e.g. Integer, Single, Double.
Remarks
Returns the smaller of two numerical values, value_1 or value_2.
Examples
Dim smaller As Single
smaller = Math.Min(-5, -4.9) ' Sets smaller to –5
smaller = Math.Min(-20/-4, 3) ' Sets smaller to 3
smaller = Math.Min(Math.Max(100, 33), 55)' Sets smaller to 55
See Also