Advertisement Jump to content
Sign in to follow this  
JavaMava

geometry question (probably easy)

This topic is 4586 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

Okay I have a right angle triangle. I have the lenghts of the adjacent and opposite sides. I need to know one of the other angles. How?

Share this post


Link to post
Share on other sites
Advertisement
so tan(opp/adj) would give me a decimal answer. How do I turn this into the angle, or am I missing something?

Share this post


Link to post
Share on other sites
Quote:
Original post by JavaMava
so tan(opp/adj) would give me a decimal answer. How do I turn this into the angle, or am I missing something?


.....erm no, you've gotten it all wrong. Did you even read the info in the linky? 'tan(angle) = opp / adj' ... do some algebra on this to get angle on its own and blammo.

Share this post


Link to post
Share on other sites
The short answer to the question is atan(opp/adj). If your programming language provides an atan2 function, atan2(opp,adj) is more robust. The angles will be expressed in radians, which is the representation that you should be using anyway.

And you should really learn some trigonometry.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

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

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!