# How do i find this angle in a right triangle?

So i'm writing a program, and i need to write a method that will give me the angle of a specific angle of a triangle when i know only the adjacent length and opposite length. I know that "tan(A) = opposite/adjacent", but how would i solve for A in that equation?

-
Have you heard of inverse trigonometric functions. See here... en.wikipedia.org/wiki/Inverse_trigonometric_functions –  user21436 Jan 13 '12 at 18:53
Never have been taught that in school, thank you very much! –  Steven Rogers Jan 13 '12 at 18:55

As you said you're working in a right triangle, the angle you're looking for is $0<\theta<\frac{\pi}{2}$ (it's most likely that the function in your programming language will give an answer in radians, not in degrees) and $$\tan\theta=\frac{\text{opposite leg}}{\text{adjacent leg}}\;\;\Leftrightarrow\;\;\theta=\arctan\left(\frac{\text{opposite leg}}{\text{adjacent leg}}\right).$$