Hypotenuse calculation