Calculate the hypotenuse for a right triangle