= 4.1.0, PHP 5, PHP 7, PHP 8)hypot — 計(jì)算一直角三角形的斜邊長(zhǎng)度 說明hypot(float $x, float $y): floathypot() 函數(shù)將會(huì)跟據(jù)直角三角形的兩直解邊長(zhǎng)度 x 和 y 計(jì)算其斜邊的長(zhǎng)度?;蛘呤菑臉?biāo)點(diǎn) (x,">
(PHP 4 >= 4.1.0, PHP 5, PHP 7, PHP 8)
hypot — 計(jì)算一直角三角形的斜邊長(zhǎng)度
$x, float $y): float
hypot() 函數(shù)將會(huì)跟據(jù)直角三角形的兩直解邊長(zhǎng)度
x 和 y 計(jì)算其斜邊的長(zhǎng)度。或者是從標(biāo)點(diǎn)
(x, y) 到原點(diǎn)的距離。該函數(shù)的算法等同于
sqrt(x*x + y*y)。
x第一條邊的長(zhǎng)度
y第二條邊的長(zhǎng)度
計(jì)算斜邊的長(zhǎng)度