Applications of finding the hypotenuse