Using Math constants in vc++ 6
-
Although it sounds quite silly, I havent been able to use the math constants defined in math.h such as M_PI etc. Can anyone help me with this?
-
Although it sounds quite silly, I havent been able to use the math constants defined in math.h such as M_PI etc. Can anyone help me with this?
The simplest way is to define one yourself. For the pi number, pi = 3.1415926535897932384626433832795......
Maxwell Chen
-
Although it sounds quite silly, I havent been able to use the math constants defined in math.h such as M_PI etc. Can anyone help me with this?
I looked the file Math.h but there was not any Costand named M_PI. also I could not find it on MSDN! are you sure there is M_PI in any header file? Kamyar Souri Software Manager Booria CAD/CAM Systems www.booria.com
-
I looked the file Math.h but there was not any Costand named M_PI. also I could not find it on MSDN! are you sure there is M_PI in any header file? Kamyar Souri Software Manager Booria CAD/CAM Systems www.booria.com
i think it is a linux/unix def. everytime i've seen this define it was a unix software. Don't try it, just do it! ;-)
-
i think it is a linux/unix def. everytime i've seen this define it was a unix software. Don't try it, just do it! ;-)
okay i think i will define my own constant rather that searching for a way to use the constant in the header file. previously i had also used it only on an unix system thanks for the help