Usually you are dealing with a right triangle. In this case you can use the Pythagorean Theorem, which equates the sum of the squares of the "legs" of the triangle with the square of the hypotenuse.
Submit an example if a question you would like to solve.