Skip to main content
gamedev.net
🔒 Locked

Simple Trig Question

Started by fyhuang Jul 2, 2004 at 1:36 PM 4 replies 700+ views
Original Post
fyhuang
fyhuang
On my calculator, there are these two buttons: sin and sin^1. sin 45 gives me .707 ... and sin^1 .707 ... gives me 45. I can't find an equivalent sin^1 in the C math libraries, can anyone help me?
- fyhuang [ site ]
wendigo23
wendigo23
try asin

edit: btw, it will return the angle in radians... if you want degrees, multiple the answer by 180/pi...
Samith
Samith
Try "asin()". It's short for acrsin, which is a common term for sin-1.
fyhuang
fyhuang
Well, that was interesting. I tried using asin() and comparing the original number to the new number (with a tolerance), and it came out not equal! Then I displayed the numbers in message boxes and they were equal. Thanks for clearing that up for me!
- fyhuang [ site ]
Lode
Lode
Note that sin-1 doesn't mean that you raise the result to the power -1, but it means it's the inverse function.
Stoffel
Stoffel
Lode: Tell that to my high school substitute math teacher. He actually wrote sin^-1 theta = 1/sin theta. We all flipped, of course (honors calc class = 30 kids who think they know everythign). It was an ugly scene. It came out that he was somehow differentiating between arcsin(theta) = (1/sin) (theta) and csc(theta) = 1/(sin theta), but that's just the screwiest damn thing I ever saw. The dude just made it worse by causing a whole scene with high schoolers; I think he got let go because of it.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.