Easy Tutorial
❮ Func Math Tan Php Ref Calendar ❯

PHP hypot() Function

PHP Math Reference Manual

Example

Calculate the hypotenuse lengths of different right-angled triangles:


Definition and Usage

The hypot() function calculates the length of the hypotenuse of a right-angled triangle.

Note: This function is equivalent to sqrt(xx + yy).


Syntax

Parameter Description
x Required. Specifies the length of the first leg of the right-angled triangle.
y Required. Specifies the length of the second leg of the right-angled triangle.

Technical Details

Return Value: The length of the hypotenuse.
Return Type: Float
--- ---
PHP Version: 4.1+
--- ---
❮ Func Math Tan Php Ref Calendar ❯