MoreMathHypot Method

Computes the length of a right triangle's hypotenuse.

Definition

Namespace: Meta.Numerics
Assembly: Meta.Numerics (in Meta.Numerics.dll) Version: 4.2.0+6d77d64445f7d5d91b12e331399c4362ecb25333
C#
public static double Hypot(
	double x,
	double y
)

Parameters

x  Double
The length of one side.
y  Double
The length of another side.

Return Value

Double
The value of sqrt(x2 + y2).

Remarks

The length is computed accurately, even in cases where x2 or y2 would overflow or underflow.

See Also