summaryrefslogtreecommitdiffstats
path: root/util.h
diff options
context:
space:
mode:
Diffstat (limited to 'util.h')
-rw-r--r--util.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/util.h b/util.h
new file mode 100644
index 0000000..1fea3ae
--- /dev/null
+++ b/util.h
@@ -0,0 +1,9 @@
+#ifndef _ROBOCUP_UTIL_H_
+#define _ROBOCUP_UTIL_H_
+
+#define MIN(a,b) ((a<b)?a:b)
+#define MAX(a,b) ((a>b)?a:b)
+#define CLAMP(min,x,max) ((x<min)?min:(x>max)?max:x)
+#define ABS(a) ((a<0)?-a:a)
+
+#endif