Skip to content

Commit

Permalink
Update MCUdude_corefiles
Browse files Browse the repository at this point in the history
Fix typo in abs() macro
Merge commit '1f03d1272ac352dd78f21fe08e5c5934c57c7622'
  • Loading branch information
MCUdude committed Mar 1, 2021
2 parents a737255 + 1f03d12 commit 59b47c1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion avr/cores/MCUdude_corefiles/Arduino.h
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ void yield(void);
#undef abs
#endif

#define abs(x) ({ typeof (x) _x = (x); _x > 0 ? _x : -x; })
#define abs(x) ({ typeof (x) _x = (x); _x > 0 ? _x : -_x; })
#define sq(x) ({ typeof (x) _x = (x); _x * _x; })
#define min(a,b) ({ typeof (a) _a = (a); typeof (b) _b = (b); _a < _b ? _a : _b; })
#define max(a,b) ({ typeof (a) _a = (a); typeof (b) _b = (b); _a > _b ? _a : _b; })
Expand Down

0 comments on commit 59b47c1

Please sign in to comment.