MyChat Scripts Engine: Min
Getting the lesser value of two specified integers.
Syntax
function Min(iValue1, iValue2: integer): integer;
Parameters and return values
Parameter |
Type |
Value |
iValue1 |
integer |
first number; |
iValue2 |
integer |
second value. |
Function result
Lesser value from two integers.
Example
var
x1, x2: double;
iMinimal: integer;
begin
x1 := LogN(2, 4);
x2 := LogN(4, 3);
iMinimal := Min(round(x1), round(x2));
mLogScript(inttostr(iMinimal), '');
end.
Script function result
[19:22:56] (Log "Min"): 1
[19:22:56] (Run "Min"): Script operation time: 5 ms
[19:22:56] (Run "Min"): Script done successfully.