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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

cos(DEGREE)

Status
Not open for further replies.

ericxbenoit

Programmer
Nov 4, 2001
5
0
0
CA
Hi

How can I use the COS and SIN function with DEGREE and not RADIAN ??

Thanks!
 
Those function work always with radians, there isn't another option. You should transform your degrees to radians, that is:
Code:
  double x; //In degrees.
  result=cos((x*M_PI)/180);
M_PI is defined on <math.h>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top