Jump to content
• ### What is your GameDev Story?

• Advertisement

# 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

##### Share on other sites
Advertisement
What you need is trigonometry. (S)illy (O)ld (H)arry (C)aught (A) (H)erring (T)rawling (O)ff (A)laska -> 'Sin = Opp / Hyp' , 'Cos = Adj / Hyp' , 'Tan = Opp / Adj'.

#### Share this post

##### Share on other sites
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

##### Share on other sites
Quote:
 Original post by JavaMavaso 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

##### 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

##### Share on other sites

• Advertisement
• Advertisement
• ### What is your GameDev Story?

In 2019 we are celebrating 20 years of GameDev.net! Share your GameDev Story with us.

(You must login to your GameDev.net account.)

• ### Popular Now

• 11
• 11
• 15
• 11
• 11
• Advertisement
• ### Forum Statistics

• Total Topics
634149
• Total Posts
3015834
×

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