小白教程
所有教程
关于
Search
172.69.7.198
172.69.7.198
参数设置
贡献
退出
操作
编辑
移动
保护
信息
历史
删除
查看“Func math hypot”的源代码
本页内容
上一节:
Func_math_hexdec
下一节:
Func_math_is_finite
因为以下原因,您没有权限编辑本页:
您请求的操作仅限属于该用户组的用户执行:
用户
您可以查看和复制此页面的源代码。
{{DISPLAYTITLE:hypot()}}[[Category:PHP Math 数学函数参考手册|24]] = PHP hypot() 函数 = [[:Category:PHP Math 数学函数参考手册]] 计算不同的直角三角形的斜边长度: <sample title="" desc="" lang="php" hererun="1"> <?php echo hypot(3,4) . "<br>"; echo hypot(4,6) . "<br>"; echo hypot(1,3) . "<br>"; echo sqrt(3*3+4*4); ?> </sample> == 定义和用法 == hypot() 函数计算直角三角形的斜边长度。 '''提示:'''该函数等同于 sqrt(x*x + y*y)。 == 语法 == <pre> hypot(x,y);</pre> {| class="table table-striped table-hover" ! 参数 ! 描述 |- | x | 必需。规定第一条直角边的长度。 |- | y | 必需。规定第二条直角边的长度。 |} == 技术细节 == {| class="table table-striped table-hover" | 返回值: | 斜边的长度。 |- | 返回类型: | Float |- | PHP 版本: | 4.1+ |} [[:Category:PHP Math 数学函数参考手册]]
返回至“
Func math hypot
”。
上一节:
Func_math_hexdec
下一节:
Func_math_is_finite