mirror of
https://github.com/fofolee/uTools-Manuals.git
synced 2025-06-18 13:57:03 +08:00
73 lines
2.2 KiB
HTML
73 lines
2.2 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
|
<html>
|
|
<head>
|
|
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
|
|
<title>计算一直角三角形的斜边长度</title>
|
|
</head>
|
|
<body class="docs"><div id="layout">
|
|
<div id="layout-content"><div id="function.hypot" class="refentry">
|
|
<div class="refnamediv">
|
|
<h1 class="refname">hypot</h1>
|
|
<p class="verinfo">(PHP 4 >= 4.1.0, PHP 5, PHP 7)</p><p class="refpurpose"><span class="refname">hypot</span> — <span class="dc-title">
|
|
计算一直角三角形的斜边长度
|
|
</span></p>
|
|
|
|
</div>
|
|
<div class="refsect1 description" id="refsect1-function.hypot-description">
|
|
<h3 class="title">说明</h3>
|
|
<div class="methodsynopsis dc-description">
|
|
<span class="methodname"><strong>hypot</strong></span>
|
|
( <span class="methodparam"><span class="type">float</span> <code class="parameter">$x</code></span>
|
|
, <span class="methodparam"><span class="type">float</span> <code class="parameter">$y</code></span>
|
|
) : <span class="type">float</span></div>
|
|
|
|
<p class="para rdfs-comment">
|
|
<span class="function"><strong>hypot()</strong></span> 函数将会跟据直角三角形的两直解边长度
|
|
<code class="parameter">x</code> 和 <code class="parameter">y</code> 计算其斜边的长度。或者是从标点
|
|
(<code class="parameter">x</code>, <code class="parameter">y</code>) 到原点的距离。该函数的算法等同于
|
|
<em>sqrt(x*x + y*y)</em>。
|
|
</p>
|
|
</div>
|
|
|
|
<div class="refsect1 parameters" id="refsect1-function.hypot-parameters">
|
|
<h3 class="title">参数</h3>
|
|
<p class="para">
|
|
<dl>
|
|
|
|
|
|
<dt>
|
|
<code class="parameter">x</code></dt>
|
|
|
|
<dd>
|
|
|
|
<p class="para">
|
|
第一条边的长度
|
|
</p>
|
|
</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<code class="parameter">y</code></dt>
|
|
|
|
<dd>
|
|
|
|
<p class="para">
|
|
第二条边的长度
|
|
</p>
|
|
</dd>
|
|
|
|
|
|
</dl>
|
|
|
|
</p>
|
|
</div>
|
|
|
|
<div class="refsect1 returnvalues" id="refsect1-function.hypot-returnvalues">
|
|
<h3 class="title">返回值</h3>
|
|
<p class="para">
|
|
计算斜边的长度
|
|
</p>
|
|
</div>
|
|
|
|
</div></div></div></body></html> |