We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our Cookie Policy & Privacy Policy
PHP hypot() function
The hypot() function is a built-in mathematical function in PHP and returns the square root of sum of square of arguments passed. It finds the hypotenuse, hypotenuse is the longest side of a right angled triangle. It is calculated by the formula :
where x and y are the other two sides of the triangle.
Syntax:
hypot(x,y);
Parameters used:
x : the length of first side.
y: the length of the second side.
Return Type: The return type of hypot(x,y) is Float and it returns the square root of squares of values passed to it as parameters.
Examples: