= 4.1.0, PHP 5, PHP 7, PHP 8)hypot — 計(jì)算一直角三角形的斜邊長(zhǎng)度 說(shuō)明hypot(float $x, float $y): floathypot() 函數(shù)將會(huì)跟據(jù)直角三角形的兩直解邊長(zhǎng)度 x 和 y 計(jì)算其斜邊的長(zhǎng)度?;蛘呤菑臉?biāo)點(diǎn) (x,">

hypot

(PHP 4 >= 4.1.0, PHP 5, PHP 7, PHP 8)

hypot 計(jì)算一直角三角形的斜邊長(zhǎng)度

說(shuō)明

hypot(float $x, float $y): float

hypot() 函數(shù)將會(huì)跟據(jù)直角三角形的兩直解邊長(zhǎng)度 xy 計(jì)算其斜邊的長(zhǎng)度?;蛘呤菑臉?biāo)點(diǎn) (x, y) 到原點(diǎn)的距離。該函數(shù)的算法等同于 sqrt(x*x + y*y)。

參數(shù)

x

第一條邊的長(zhǎng)度

y

第二條邊的長(zhǎng)度

返回值

計(jì)算斜邊的長(zhǎng)度