help with my function

Started by
17 comments, last by YodaTheCoda 21 years ago
quote:Original post by YodaTheCoda
why does this not gi ve me the angle?


What angle is "the" angle? The angle you calculate is the angle between the positive x-axis and the vector (v2-v1). If this is not the angle you want then that is the reason you don''t get it.
Advertisement
yuor not making any sense poppet
of cuorse if i dont have the angle then i dont hasve the angle
what is yuor pointy?
Please don''t feed the trolls.
im sure hes just confused
dont be to hard on him
at least let him explain himself first
The way to find the angle (as already suggested by MDI and Prosper/LOADED) is:

  angle = acos( Dot( v1, v2 ) / ( Length(v1)*Length(v2) ) );  


Atan is a 2D fuction. You can use it in 3D, but it is very complicated.
John BoltonLocomotive Games (THQ)Current Project: Destroy All Humans (Wii). IN STORES NOW!
Yuo shood not tok about things yuo cannot spel dumass
YodaTheCoda is a troll.
He''s winding you all up, look at his profile for his past posts (he keeps telling beginners all C++ is compiled to Cobol and then to Assembly, for one).
That''s a handy feature. Certainly a drastic differance in his command of the language from some of those other posts to this isn''t there. Something does seem a bit fishy.
Keys to success: Ability, ambition and opportunity.
I''m closing this thread for the following reasons:

1) Without a better explanation of the desired angle I believe the problem has been properly solved by Prosper/LOADED, MDI, and Jambolo.

2) This thread is getting a bit out of hand. Any discussion of coding practices should happen in the general programming forum or the lounge.


Graham Rhodes
Senior Scientist
Applied Research Associates, Inc.
Graham Rhodes Moderator, Math & Physics forum @ gamedev.net

This topic is closed to new replies.

Advertisement