min and max
These simple but useful functions return the least or greatest of two parameters.
function int min (int a, int b)
{
if (a < b)
return a;
return b;
}
function int max (int a, int b)
{
if (a > b)
return a;
return b;
}
This article is issued from Zdoom. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.