Finding the angle of an X and Y movement
On the calculator there is a tan-1 function to get the angle of tan(X) = opposite/adjacent, but what is the math libraries version? I bet it is dog slow, is there any way to optimize it (floating point index support, maybe just round it or find the closest one)
ahh the wonderfull world of physics (not!)
Assuming you''re using C/C++ look up atan and/or atan2 (just do a search online, you''ll find them).
quote:Original post by Anonymous Poster
why an online search, why not look in the VC++ documentation?
Did he say he has MSVC? If he doesn''t have MSVC, then me telling him to look it its documentation is no better than me assuming he uses a Unix and telling him to look at atan(3) in the man pages. So, I gave him a generic answer...
I like asking questions better, so I can answer myself and provide info to other people if I find it myself
talking aboult libraries is a unix term, guess I should always mention my platform (VC++ 6 :p )! (like in my sig maybe)
so you give atan2 the length of the opposite and adjacent sides and it gives you the angle? I have no idea what an ''arctangent'' is :p
talking aboult libraries is a unix term, guess I should always mention my platform (VC++ 6 :p )! (like in my sig maybe)
so you give atan2 the length of the opposite and adjacent sides and it gives you the angle? I have no idea what an ''arctangent'' is :p
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement