We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 963e72a commit ce2d7b8Copy full SHA for ce2d7b8
Arduino.h
@@ -121,7 +121,7 @@ void yield(void);
121
#undef abs
122
#endif
123
124
-#define abs(x) ({ typeof (x) _x = (x); _x > 0 ? _x : -x; })
+#define abs(x) ({ typeof (x) _x = (x); _x > 0 ? _x : -_x; })
125
#define sq(x) ({ typeof (x) _x = (x); _x * _x; })
126
#define min(a,b) ({ typeof (a) _a = (a); typeof (b) _b = (b); _a < _b ? _a : _b; })
127
#define max(a,b) ({ typeof (a) _a = (a); typeof (b) _b = (b); _a > _b ? _a : _b; })
0 commit comments