Function std.math.hypot
Calculates the length of the
hypotenuse of a right-angled triangle with sides of length x
and y
.
The hypotenuse is the value of the square root of
the sums of the squares of x
and y
:
Note that hypot
(x
, y
), hypot
(y
, x
) and
hypot
(x
, -y
) are equivalent.
x
y
hypot
(x
, y
)x
x
|y
Prototype
real hypot( real x, real y ) pure nothrow @nogc @safe;
Authors
Walter Bright, Don Clugston, Conversion of CEPHES math library to D by Iain Buclaw