aboutsummaryrefslogtreecommitdiff
path: root/src/libjin/math/math.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/libjin/math/math.h')
-rw-r--r--src/libjin/math/math.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/libjin/math/math.h b/src/libjin/math/math.h
index fdf1725..f6a299e 100644
--- a/src/libjin/math/math.h
+++ b/src/libjin/math/math.h
@@ -6,6 +6,11 @@
#include "constant.h"
#include "matrix.h"
#include "quad.h"
-#include "rect.h"
+
+#define min(a,b) (((a) < (b)) ? (a) : (b))
+#define max(a,b) (((a) > (b)) ? (a) : (b))
+#define clamp(a, mi,ma) min(max(a,mi),ma)
+#define within(a,min,max) (a >= min && a <= max)
+#define without(a,min,max) (a < min || a > max)
#endif \ No newline at end of file