diff --git a/avr/cores/MCUdude_corefiles/Arduino.h b/avr/cores/MCUdude_corefiles/Arduino.h index 6dfcc9b2..78eeb8a2 100755 --- a/avr/cores/MCUdude_corefiles/Arduino.h +++ b/avr/cores/MCUdude_corefiles/Arduino.h @@ -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()