I am working on a new project and I am trying to write the cleanest, easiest to read and hopefully, most efficient, code I can.
I need to use PI but apparently it isn't defined in math.h. So I read about doing this:
const double PI = atan(1.0)*4
But I get this error:
A function call cannot appear in a constant-expression
Any ideas on why? How can I get PI as a constant?
Also, please, I am trying to learn as much as I can with this project, so it would be great if you could also explain why your answer would work. Thanks!