ArduinoCore-API icon indicating copy to clipboard operation
ArduinoCore-API copied to clipboard

Why not using abs() from stdlib?

Open NicoHood opened this issue 8 years ago • 1 comments

Why does Arduino.h use its own abs() if stdlib has this already builtin. This causes me problems in build environments. I dont see any reason why one would prefer an Arduino definition. Can we get rid of it?

#define abs(x) ((x)>0?(x):-(x))

NicoHood avatar Sep 01 '17 13:09 NicoHood

To be considered for merge alongside https://github.com/arduino/Arduino/issues/6098 (I'm :+1: for both)

facchinm avatar Sep 04 '17 16:09 facchinm