I'm working on an arduino library needing the abs() function:
#include <math.h>
normTransFreq1 = abs(1.0);
Error: 'abs' was not declared in this scope
As math.h
is already included in the cpp I'm entirely unsure how to fix this problem. A new install of arduino 1.5.2 didn't help.
Just found the solution:
Including math.h is not needed for the library. Instead, Arduino.h should be included by adding the following to the header file: