Moving hypotenuse function into geometry module.