Back to Math
hypot
Compute the hypotenuse length sqrt(x^2 + y^2) without overflow.
Syntax
hypot(x, y) → r
Backends
TypeScript
Description
Compute the hypotenuse length sqrt(x^2 + y^2) without overflow.
Parameters
| Name | Description |
|---|---|
| x | First leg |
| y | Second leg |
Returns
Length of hypotenuse
Examples
Try It
>> hypot(3, 4)