aboutsummaryrefslogtreecommitdiffstats
path: root/src/rfps_utils.cpp
diff options
context:
space:
mode:
authorsalaaad2 <arthurdurant263@gmail.com>2022-06-09 19:25:27 +0200
committersalaaad2 <arthurdurant263@gmail.com>2022-06-09 19:25:27 +0200
commitdf4d3026f27c9c55e75aff1232af22962936e5ea (patch)
treec5b3a05bb92deee11eebc31ae98ed87ea404108d /src/rfps_utils.cpp
parentstart working on collisions (diff)
downloadyabs-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.cpp16
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