Skip to content

Commit

Permalink
Fix typo on round() macro
Browse files Browse the repository at this point in the history
  • Loading branch information
MCUdude committed Feb 19, 2021
1 parent 7dbf59c commit 75fa91e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions avr/cores/microcore/Arduino.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,9 @@ extern "C"{
#define abs(x) __builtin_abs(x)
#endif
#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; })
#define round(x) ({ typeof (x) _x = (x); _x >= 0 ? (long)_x + 0.5 : (long)_x - 0.5; })
#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; })
#define round(x) ({ typeof (x) _x = (x); _x >= 0 ? (long)(_x + 0.5) : (long)(_x - 0.5); })
#define radians(deg) ((deg) * DEG_TO_RAD)
#define degrees(rad) ((rad) * RAD_TO_DEG)
#define constrain(x,low,high) ({ \
Expand Down

0 comments on commit 75fa91e

Please sign in to comment.