Skip to content

Commit

Permalink
Fix typos in macros
Browse files Browse the repository at this point in the history
Merge commit '4ee8e2d74a905ff13f24ed02239ffab01c067a76'
  • Loading branch information
MCUdude committed Dec 9, 2020
2 parents c32fb58 + 4ee8e2d commit 46d326d
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions avr/cores/MCUdude_corefiles/Arduino.h
Original file line number Diff line number Diff line change
Expand Up @@ -125,14 +125,14 @@ void yield(void);
#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 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) ({ \
typeof (x) _x = (x); \
typeof (low) _l = (l); \
typeof (high) _h = (h); \
_x < _l ? _l : _x > _h ? _h :_x })
#define constrain(x,low,high) ({ \
typeof (x) _x = (x); \
typeof (low) _l = (low); \
typeof (high) _h = (high); \
_x < _l ? _l : _x > _h ? _h : _x; })

#define interrupts() sei()
#define noInterrupts() cli()
Expand Down

0 comments on commit 46d326d

Please sign in to comment.