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

Username:   Password: 
 RegisterRegister   
 arctand function
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
sashman




PostPosted: Sat Apr 23, 2005 10:03 am   Post subject: arctand function

i'm trying to calculate the tan of an angle in a program i'm making, but the only function in turing is arctan and arctand, but those are just inverse tan. arctand would give me the angle, but i already have the angle. What i need is the calculate the tan of an angle.


e.g. arctand (root(3)) = 60

what i need is tan (60) = root(3)

is ther a function in turing that's simply tan, or do i have to do make some wierd combination. thanks for your help.
Sponsor
Sponsor
Sponsor
sponsor
Cervantes




PostPosted: Sat Apr 23, 2005 10:28 am   Post subject: (No subject)

Turing 4.0.5 has tan and tand. I'm not sure, but I seem to remember something about previous versions having tan, just that it's not documented.

Anyways, here's some math:

tan (theta) = sin (theta) / cos (theta)

sin (theta) = y/r
cos (theta) = x/r

sin (theta) / cos (theta) = (y/r) / (x/r) = (y/r) * (r/x) = y/x = tan (theta)
sashman




PostPosted: Sat Apr 23, 2005 10:54 am   Post subject: (No subject)

sweeet it works. thanks for the help
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 3 Posts ]
Jump to:   


Style:  
Search: