Computer Science Canada arctand function |
Author: | sashman [ 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. |
Author: | Cervantes [ Sat Apr 23, 2005 10:28 am ] |
Post 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) |
Author: | sashman [ Sat Apr 23, 2005 10:54 am ] |
Post subject: | |
sweeet it works. thanks for the help |