util: refactor intmin/max to standalone file

This commit is contained in:
2021-10-10 23:45:47 +08:00
parent dfce649314
commit d6ae83b0a8
2 changed files with 11 additions and 4 deletions

10
util/minmax.h Normal file
View File

@ -0,0 +1,10 @@
#pragma once
static inline int intmin(int x, int y) {
return x < y ? x : y;
}
static inline int intmax(int x, int y) {
return x > y ? x : y;
}