use qmath.h instead of math.h (qmath.h should always have M_PI)