Hi everyone,
Does anyone know if they have dropped the constant "M_PI" in the <cmath> or <math.h> header? Until now, I've always used it.. :-(
Thanks for your answer!
Mark
Hi everyone,
Does anyone know if they have dropped the constant "M_PI" in the <cmath> or <math.h> header? Until now, I've always used it.. :-(
Thanks for your answer!
Mark
I do not think that it was ever part of standard C++ (or standard C).
Look up a C++ Reference and learn How To Ask Questions The Smart WayOriginally Posted by Bjarne Stroustrup (2000-10-14)
It's not standard, although most implementations provide it. I'd just define it myself:
Code:#include <cmath> #ifndef M_PI #define M_PI 3.14159265358979323846 #endif
Code://try //{ if (a) do { f( b); } while(1); else do { f(!b); } while(1); //}