Right triangle

What is B if A is 3 and H is 18? How do you calculate?

,What is B if A is 3 and H is 18? How do you calculate?

This is related to trigonometry. usually it is referred to up is X bottom is Y and r is the other(forgetting technical name). The forumal to find.

r = Mathf.Sqrt(Mathf.Pow(x, 2) + Mathf.Pow(y, 2));

so solve for x or y

x = Mathf.Sqrt(Mathf.Pow(r, 2) - Mathf.Pow(y, 2));
y = Mathf.Sqrt(Mathf.Pow(r, 2) - Mathf.Pow(x, 2));

also if only r is known and the angles you can find x and y with sin, and cos.