How to find opposite and adjacent lengths of a right triangle given the hypotenuse and angle?

28.5k Views Asked by At

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?

2

There are 2 best solutions below

2
On 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).

7
On

Two words for you: sine and cosine

enter image description here