System.Math.Hypot
Delphi
function Hypot(const X, Y: Single): Single;
function Hypot(const X, Y: Double): Double;
function Hypot(const X, Y: Extended): Extended;
C++
extern DELPHI_PACKAGE float __fastcall Hypot(const float X, const float Y)/* overload */;
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
function | public | System.Math.pas System.Math.hpp |
System.Math | System.Math |
Description
Calculates the length of the hypotenuse.
Hypot returns the length of the hypotenuse of a right triangle. Specify the lengths of the sides adjacent to the right angle in X and Y. Hypot uses the formula
Sqrt(X**2 + Y**2)