Skip to content

Commit b029627

Browse files
committed
Squashed 'avr/cores/MCUdude_corefiles/' changes from cfac63a6..fa31758e
fa31758e Fix typos in macros git-subtree-dir: avr/cores/MCUdude_corefiles git-subtree-split: fa31758e9f5a0c61a5dc79c6960d789eba8f1294
1 parent 52ae44f commit b029627

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

Arduino.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -125,14 +125,14 @@ void yield(void);
125125
#define sq(x) ({ typeof (x) _x = (x); _x * _x; })
126126
#define min(a,b) ({ typeof (a) _a = (a); typeof (b) _b = (b); _a < _b ? _a : _b; })
127127
#define max(a,b) ({ typeof (a) _a = (a); typeof (b) _b = (b); _a > _b ? _a : _b; })
128-
#define round(x) ({ typeof (x) _x = (x); _x >= 0 ? (long)_x + 0.5 : (long)_x - 0.5 })
128+
#define round(x) ({ typeof (x) _x = (x); _x >= 0 ? (long)_x + 0.5 : (long)_x - 0.5; })
129129
#define radians(deg) ((deg) * DEG_TO_RAD)
130130
#define degrees(rad) ((rad) * RAD_TO_DEG)
131-
#define constrain(x,low,high) ({ \
132-
typeof (x) _x = (x); \
133-
typeof (low) _l = (l); \
134-
typeof (high) _h = (h); \
135-
_x < _l ? _l : _x > _h ? _h :_x })
131+
#define constrain(x,low,high) ({ \
132+
typeof (x) _x = (x); \
133+
typeof (low) _l = (low); \
134+
typeof (high) _h = (high); \
135+
_x < _l ? _l : _x > _h ? _h : _x; })
136136

137137
#define interrupts() sei()
138138
#define noInterrupts() cli()

0 commit comments

Comments
 (0)