Computes the hypotenuse of a right triangle.