hypot

hypot(number x, number y) → real hypotenuse
Returns the hypotenuse of the right-angled triangle with sides x and y. Equivalent to sqrt(x**2 + y**2).

Returns the hypotenuse of the right triangle with sides x* and *y. Equivalent to sqrt(x * 2 + y * 2).

Parameters
Return
Examples

hypot(1, 1) // sqrt(2) hypot(3, 4) // 5

See also