Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Sine and cosine
Index -> Programming, C++ -> C++ Tutorials
View previous topic Printable versionDownload TopicRate TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Martin




PostPosted: 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....
Sponsor
Sponsor
Sponsor
sponsor
Display posts from previous:   
   Index -> Programming, C++ -> C++ Tutorials
View previous topic Tell A FriendPrintable versionDownload TopicRate TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 1 Posts ]
Jump to:   


Style:  
Search: