Elementary.Hypot Method

Gets the length of the hypotenuse of a right-angled triangle with sides of specified length.

Definition

Namespace: Extreme.Mathematics
Assembly: Extreme.Numerics (in Extreme.Numerics.dll) Version: 8.1.23
C#
public static double Hypot(
	double a,
	double b
)

Parameters

a  Double
The length of the first side.
b  Double
The length of the second side.

Return Value

Double
The length of the hypotenuse.

Remarks

The calculation of the hypotenuse involves squaring the arguments. Unless special precautions are taken, an overflow may occur during the calculations even if the result is within acceptable bounds.

See Also