← All built-ins / hypot()
hypot()
hypot(...$args): float
Parameters
| Name | Type | Description |
|---|---|---|
| $x | float|int | first leg |
| $y | float|int | second leg |
Return value
sqrt(x² + y²), overflow-safe.
Example
echo hypot(3, 4), " ", hypot(5, 12);
5 13
| Name | Type | Description |
|---|---|---|
| $x | float|int | first leg |
| $y | float|int | second leg |
sqrt(x² + y²), overflow-safe.
echo hypot(3, 4), " ", hypot(5, 12);
5 13