# 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

Basically, as George Watts said, you're looking for the inverse tangent function. Depending on what programming language, that's probably a function called atan or arctan or some variant of that.
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).$$
Note that if you're not exactly trying to find an acute angle in a right triangle (e.g. if you're trying to find the angle of inclination of a line), you might be better off with the 2-argument arctan function (often atan2) or some other technique.