[Math] How to find opposite and adjacent lengths of a right triangle given the hypotenuse and angle

trianglestrigonometry

I'm writing a few functions for a JavaScript game engine. Is it possible to calculate the length of the legs of a right triangle given ONLY the length of the hypotenuse and an angle?

Best Answer

Well, yes, I believe so. Use the sin formula: $$c=\dfrac{b}{\sin B}=\dfrac{a}{\sin A}\\ \implies b=c\sin B,\quad a=c\sin A$$ Given $\angle A\text{ or }\angle B $ we can calculate the other angle (right triangle).

Related Question