Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Cybertron

Finding the angle of an X and Y movement

This topic is 6009 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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!)

Share this post


Link to post
Share on other sites
Advertisement
Guest Anonymous Poster
why an online search, why not look in the VC++ documentation?

Share this post


Link to post
Share on other sites
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...

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
that''s right.
atan(opposite/adjacent) = angle

Share this post


Link to post
Share on other sites
quote:
Original post by BSXrider
I still mentally use "soh-cah-toa" to remember which one to use with whice sides.

- seb


I just learned trig a month or 2 ago :p man that was fun, if only the exam was only trig and not stupid factoring...

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!