# Calculate an angle from Tan, Cos, or Sine

I'd like to calculate an angle using nothing but either tangent, cosine, or sine, or any combination of the two. Is this possible? If so, how?

I know how to program, but I find that I can't really get much farther until I start learning higher level mathematics. Therefore, I'm writing out C functions to teach me maths :D.

-
So this is for programming? You'll want to look into two-argument arctangent (atan2() in some languages). –  Ｊ. Ｍ. Dec 24 '11 at 8:44

You want to learn programming and advanced mathematics then find root of $$f(\phi) = \cos\theta - \cos \phi$$

using Bisection method or Newton-Raphson method. Writing program for any of the methods is easy.

Note: Here $\cos \theta$ is value of cosine given to you and $\phi$ is your guess.

-