diff options
author | salaaad2 <arthurdurant263@gmail.com> | 2022-06-09 19:25:27 +0200 |
---|---|---|
committer | salaaad2 <arthurdurant263@gmail.com> | 2022-06-09 19:25:27 +0200 |
commit | df4d3026f27c9c55e75aff1232af22962936e5ea (patch) | |
tree | c5b3a05bb92deee11eebc31ae98ed87ea404108d /src/rfps_utils.cpp | |
parent | start working on collisions (diff) | |
download | yabs-df4d3026f27c9c55e75aff1232af22962936e5ea.tar.gz yabs-df4d3026f27c9c55e75aff1232af22962936e5ea.tar.bz2 yabs-df4d3026f27c9c55e75aff1232af22962936e5ea.tar.xz yabs-df4d3026f27c9c55e75aff1232af22962936e5ea.tar.zst yabs-df4d3026f27c9c55e75aff1232af22962936e5ea.zip |
my bad lol
Diffstat (limited to 'src/rfps_utils.cpp')
-rw-r--r-- | src/rfps_utils.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/rfps_utils.cpp b/src/rfps_utils.cpp new file mode 100644 index 0000000..c595a21 --- /dev/null +++ b/src/rfps_utils.cpp @@ -0,0 +1,16 @@ +#include "rfps_utils.h" + +namespace utils { +// unused, for now :^} +int min(const int& v1, const int& v2) { + return v1 >= v2 ? v2 : v1; +} + +int max(const int& v1, const int& v2) { + return v1 >= v2 ? v1 : v2; +} + +int clamp(const int& v, const int& v1, const int& v2) { + return v >= v1 ? (v <= v2 ? v : v2) : v1; +} +} // namespace utils |