Page 1 of 1
asin and acos
Posted: Sun May 18, 2008 6:04 pm
by turshija
Wierd arcsin and arccos are not yet implemented ...
any trig function to get arcsin and arccos without it?
i need it for my new project ...
Posted: Sun May 18, 2008 9:07 pm
by kattle87
you have atan2: you have what you need
http://en.wikipedia.org/wiki/Inverse_tr ... alculation
read also the "Two argument variant of arctangent" snip.
However, a preprocessor feature would be GREAT!
Something like the ansi-C DEFINE would help

Posted: Sun May 18, 2008 9:43 pm
by turshija
okay ...
i looked at that site, and im obviously too stupid

can you just write me what should I type to find asin and what to find acos in ZGE ?

Posted: Sun May 18, 2008 9:59 pm
by kattle87
maybe tomorrow i'll post! In the meantime, tell me what you would like to do...
Posted: Mon May 19, 2008 3:59 pm
by turshija
i want to make game with third person camera so basically I want something like this:
red circle in the middle is
PlayerModel and
α is the PlayerModel's rotation ...
I want to place camera behind the player and to follow him by setting the camera's position to M position with
α rotation ...
but I don't know how to find M(x,y) ... I think it can be found like this:
Code: Select all
x = arccos(alfa+pi);
y = arcsin(alfa+pi);
but I'm not really sure, and I can't try it at all since I don't have arccos and arcsin functions
