I have got the following problem:
I want to use M_PI
defined in math.h
. In order to do that, one should define _USE_MATH_DEFINES
before including the header.
The following solution works correctly:
#define _USE_MATH_DEFINES
and then
#include < math.h >
However, I would like to add the definition of _USE_MATH_DEFINES
to the Preprocessor Definitions (Project->Properties->C/C++->Preprocessor->Preprocessor Definitions). If I add _USE_MATH_DEFINES
there, M_PI
is not recognized (as without defining the constant at all).
Why is that so? Do you have any ideas?