Trigonometry problem with radians and degrees
Posted on 2002-05-26
I have a small trigonometric query.
Using functions like sin, cos and tan declared in the <math.h> file returns the answer in radians, I need the answer in degrees. Some MSDN documentation told me to times radians by (180/pi) to convert them to degrees. However, this formula is not accurate when compared to the results given when calculating cos(30) for example with a calculator in RAD and then DEG mode.
How can I set the data format or result format for these functions, or more accurately convert the answer from RAD to DEG?