]> rtime.felk.cvut.cz Git - eurobot/public.git/commitdiff
Fix redefinition of MIN/MAX macros warnings on recent Linux distributions maint-demo
authorMichal Sojka <sojkam1@fel.cvut.cz>
Fri, 15 Nov 2013 16:08:48 +0000 (17:08 +0100)
committerMichal Sojka <sojkam1@fel.cvut.cz>
Fri, 15 Nov 2013 16:08:48 +0000 (17:08 +0100)
src/robomath/robomath.h

index 332e526f226e02c97d6a2fbe3fec4acf723dc01e..041c43884ef6166713b3e1042b984cd1d1268d29 100644 (file)
 #define DEG2RAD(a)             ((a)/180.0*M_PI)
 #define RAD2DEG(a)             ((a)*180.0/M_PI)
 #define DEGREES(a)             RAD2DEG(a)
-#define MIN(a, b)              (((a) < (b)) ? (a) : (b))
-#define MAX(a, b)              (((a) > (b)) ? (a) : (b))
-
+#ifndef MIN
+#  define MIN(a, b)            (((a) < (b)) ? (a) : (b))
+#endif
+#ifndef MAX
+#  define MAX(a, b)            (((a) > (b)) ? (a) : (b))
+#endif
 /* used to analyze angles frequency */
 struct angles_freq {
        double angle;