basic trig
given triangle with sides A B C and angles a b c (angle name being the angle directly opposite of the side), and C being the hypotenuse (making c 90 deg)
sin(a) * C = A
cos(a) * C = B
tan(a) * B = A
basically if you have two sides and an angle of a right triangle, or one side and two angles, you can solve for the whole thing
make sure your angle is in radians cause thats how 99% of all languages handle trig