Archived

This topic is now archived and is closed to further replies.

The C modest god

The PI constant

Recommended Posts

PeterTarkus    122
I don't think that any of the std headers include a PI constant definition, maybe things have changed, however you can easily do it yourself like this.

Go to calculator. Hit PI. Hit copy. Goto your code. type

#define PI [paste here]

and you have it. That is if you are like me and forget PI after about the 5th digit or so :-) 3.1415...

You can be more savvy and make it a const double PI or whatever, if you want to, I am content with #defines.

Peace

[edited by - PeterTarkus on May 27, 2004 4:25:48 AM]

Share this post


Link to post
Share on other sites