help files
Z505 | PasWiki | FUQ | Search | Main Docs | API Guide



[Overview][Constants][Types][Classes][Procedures and functions] Reference for unit 'math' (#rtl)

hypot

Return hypotenuse of triangle

Declaration

Source position: math.pp line 297

function hypot(

  x: float;

  y: float

):float;

Description

Hypot returns the hypotenuse of the triangle where the sides adjacent to the square angle have lengths x and y. The function uses Pythagoras' rule for this.

Errors

None.

Example

Program Example17;

{ Program to demonstrate the hypot function. }

Uses math;

begin
  Writeln(hypot(3,4)); // should be 5
end.

Notes

 No notes exist for this page yet. 





lufdoc, Powtils, fpc, freepascal, delphi, kylix, c/c++, mysql, cgi web framework docs, Z505