Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Codewarrior predefined value of pi 1

Status
Not open for further replies.

Jeeembo

Programmer
Jan 19, 2003
3
CA
is there a predefined value of pi avaliable in Metrowerks Codewarrior??
 
if there is not, you can always go with 22/7.

const double PI = 22/7;

<Matt
 
or

[tt]#define PI 3.141592653589793238462643383279

[/tt]
tellis.gif

programmer (prog'ram'er), n A hot-headed, anorak wearing, pimple-faced computer geek.
 
No there isn't. 355/113 is a good enough approximation for most engineering problems (6 digits) but for greater accuracy, take qednick's suggestion.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top