We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 10eac92 commit 995e5b1Copy full SHA for 995e5b1
cores/esp32/Arduino.h
@@ -70,11 +70,11 @@
70
#endif
71
72
// can't define max() / min() because of conflicts with C++
73
-#define _min(a,b) ((a)<(b)?(a):(b))
+#define _min(a,b) ((a)<(b)?(a):(b))
74
#define _max(a,b) ((a)>(b)?(a):(b))
75
-//#define abs(x) ((x)>0?(x):-(x)) // abs() comes from stdlib
+#define _abs(x) ((x)>0?(x):-(x)) // abs() comes from STL
76
#define constrain(amt,low,high) ((amt)<(low)?(low):((amt)>(high)?(high):(amt)))
77
-#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)) // round() comes from STL
78
#define radians(deg) ((deg)*DEG_TO_RAD)
79
#define degrees(rad) ((rad)*RAD_TO_DEG)
80
#define sq(x) ((x)*(x))
0 commit comments