Computer Science Canada

Sine and cosine

Author:  Martin [ Sat Jun 14, 2003 1:38 am ]
Post subject:  Sine and cosine

I came across this while programming all day...
There is no SineDegrees or CosineDegrees function in math.h, so here's how you do it:

code:
float degrees; //The angle, in degrees
const float PI = 3.141592;//etc....
float sind = sin(degrees*PI/180); // Sine degrees...
float cosd = cos(degrees*PI/180);//Cosine degrees....


: