diff options
author | mRnea <akannemre@gmail.com> | 2024-12-19 23:37:28 +0300 |
---|---|---|
committer | mRnea <akannemre@gmail.com> | 2024-12-19 23:37:28 +0300 |
commit | f4012e2c8455ed3b94ef4007fac4647efe08ffb0 (patch) | |
tree | 8461d5f2c831d4f71307c6cb7458e34c29d617e2 /util.h | |
parent | cbd218eaad11c7bc21fd810885716835c5d8ea5e (diff) |
just some cleanup
Diffstat (limited to 'util.h')
-rw-r--r-- | util.h | 21 |
1 files changed, 21 insertions, 0 deletions
@@ -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 |