PHP function hypot()

Availability in versions: PHP 4.1.0

Calculate the length of the hypotenuse of a right-angle triangle

Parameters

Parameter Data type Default value Note
$x float not Length of first side
$y float not Length of second side

Return values

float

Calculated length of the hypotenuse

Other sources

Official documentation of the hypot function

Newsletter

Nejlepsi tipy a triky o PHP do Vaseho e-mailu. Clanky a novinky nejen ze sveta PHP a programovani.