This is not geometry. This is trigonometry.
Here's something google brought-up:
[link|http://aleph0.clarku.edu/~djoyce/java/trig/|Dave's short course in trigonometry]
I think you may be missing the point of trig functions--they are more than just formulas you "throw" at the problem. They also form the notation used to express the relationships between angles and sides in right triangles.
HTH