Added utils_max(). utils_min() is now a one liner.

This commit is contained in:
Scoopta 2020-02-25 00:13:12 -08:00
parent a1beb82635
commit f7b599fe6f

View File

@ -49,11 +49,11 @@ char* utils_concat(size_t arg_count, ...) {
} }
size_t utils_min(size_t n1, size_t n2) { size_t utils_min(size_t n1, size_t n2) {
if(n1 < n2) { return n1 < n2 ? n1 : n2;
return n1; }
} else {
return n2; size_t utils_max(size_t n1, size_t n2) {
} return n1 > n2 ? n1 : n2;
} }
size_t utils_min3(size_t n1, size_t n2, size_t n3) { size_t utils_min3(size_t n1, size_t n2, size_t n3) {