Skip to content
Snippets Groups Projects
Commit 3589d6c2 authored by Jonathan BAUDIN's avatar Jonathan BAUDIN
Browse files

Fix abs define

parent 43995198
No related branches found
No related tags found
No related merge requests found
...@@ -59,9 +59,11 @@ enum BitOrder { ...@@ -59,9 +59,11 @@ enum BitOrder {
#define EXTERNAL 0 #define EXTERNAL 0
// undefine stdlib's abs if encountered // undefine stdlib's abs if encountered
#ifdef abs
#undef abs //#ifdef abs
#endif // abs //#undef abs
//#endif // abs
#ifndef min #ifndef min
#define min(a,b) ((a)<(b)?(a):(b)) #define min(a,b) ((a)<(b)?(a):(b))
...@@ -71,7 +73,7 @@ enum BitOrder { ...@@ -71,7 +73,7 @@ enum BitOrder {
#define max(a,b) ((a)>(b)?(a):(b)) #define max(a,b) ((a)>(b)?(a):(b))
#endif // max #endif // max
#define abs(x) ((x)>0?(x):-(x)) //#define abs(x) ((x)>0?(x):-(x))
#define constrain(amt,low,high) ((amt)<(low)?(low):((amt)>(high)?(high):(amt))) #define constrain(amt,low,high) ((amt)<(low)?(low):((amt)>(high)?(high):(amt)))
#define round(x) ((x)>=0?(long)((x)+0.5):(long)((x)-0.5)) #define round(x) ((x)>=0?(long)((x)+0.5):(long)((x)-0.5))
#define radians(deg) ((deg)*DEG_TO_RAD) #define radians(deg) ((deg)*DEG_TO_RAD)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment