aboutsummaryrefslogtreecommitdiff
path: root/src/libjin/math/math.h
diff options
context:
space:
mode:
authorchai <chaifix@163.com>2018-05-21 16:02:00 +0800
committerchai <chaifix@163.com>2018-05-21 16:02:00 +0800
commitfa234f9663b992cf50bcf865a1cde6845b42193c (patch)
tree34ecd41b60ef48c960a79a4077e5e0c8536102fd /src/libjin/math/math.h
parent51ba9cb2a6b0b9395a2912eadeb954c95e4c1d3c (diff)
修改audio模块
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