Deprecated: Optional parameter $keys declared before required parameter $cms_id is implicitly treated as a required parameter in /home/www/dev/work/class/blog/CmsKey.php on line 75

Deprecated: Creation of dynamic property lvesu\lvesu\controller\blog\php::$title is deprecated in /home/www/dev/work/website/lvesu/class/controller/blog/php.php on line 28

Deprecated: Creation of dynamic property lvesu\lvesu\controller\blog\php::$outlink is deprecated in /home/www/dev/work/website/lvesu/template/blog/cms/php.manual.tpl on line 2

Deprecated: Creation of dynamic property lvesu\lvesu\controller\blog\php::$status is deprecated in /home/www/dev/work/website/lvesu/template/blog/index.head.php on line 2
PHP - Manual: hypot - 互联网笔记

略微加速

PHP官方手册 - 互联网笔记

PHP - Manual: hypot

2025-04-26

hypot

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

hypot 计算直角三角形的斜边长度

说明

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

hypot() 函数将会根据直角三角形的两直角边长度 xy 计算其斜边的长度。或者是坐标点 (x, y)到原点的距离。该函数的算法等同于 sqrt($x*$x + $y*$y)

参数

x

第一条边的长度

y

第二条边的长度

返回值

计算斜边的长度

添加备注

用户贡献的备注

此页面尚无用户贡献的备注。

官方地址:https://www.php.net/manual/en/function.hypot.php

北京半月雨文化科技有限公司.版权所有 京ICP备12026184号-3