Anytime man, glad to share my useless knowledge whenever possible.
Really just got it from trying different #s. Once I set up that equation I just started plugging in #s for the angle, then getting the result and seeing if it matche. I am sure there is a way to prove it out with the formulas, though I am almost certain that with a small equation like this that would have taken me longer than just trial and error.