min and max
Jump to navigation
Jump to search
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; }