I want to use the math constants, such as M_PI and M_E, in Visual C++ 2008. I assumed they were defined in the cmath header.
M_PI. Pi, the ratio of a circle's circumference to its diameter. M_PI_2. Pi divided by two.
They are, but you also need to #define _USE_MATH_DEFINES
before you #include <cmath>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With