just some cleanup

This commit is contained in:
2024-12-19 23:37:28 +03:00
parent cbd218eaad
commit f4012e2c84
5 changed files with 52 additions and 15 deletions

21
util.h Normal file
View File

@@ -0,0 +1,21 @@
/*
Utility definitions shared by games
*/
#ifndef GAMES_UTIL_H
#define GAMES_UTIL_H
/* https://stackoverflow.com/questions/3437404/min-and-max-in-c
https://www.reddit.com/r/C_Programming/comments/1aoan41/apparently_inline_is_being_a_dumbo_in_c99_and/
I am so confused...
*/
inline int imax(int a, int b){
return a > b ? a : b;
}
inline int imin(int a, int b){
return a < b ? a : b;
}
#endif