<!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>Calculate the length of the hypotenuse of a right-angle triangle</title> </head> <body><div class="manualnavbar" style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="function.hexdec.html">hexdec</a></div> <div class="next" style="text-align: right; float: right;"><a href="function.is-finite.html">is_finite</a></div> <div class="up"><a href="ref.math.html">Math Functions</a></div> <div class="home"><a href="index.html">PHP Manual</a></div> </div><hr /><div id="function.hypot" class="refentry"> <div class="refnamediv"> <h1 class="refname">hypot</h1> <p class="verinfo">(PHP 4 >= 4.1.0, PHP 5)</p><p class="refpurpose"><span class="refname">hypot</span> — <span class="dc-title"> Calculate the length of the hypotenuse of a right-angle triangle </span></p> </div> <div class="refsect1 description" id="refsect1-function.hypot-description"> <h3 class="title">Description</h3> <div class="methodsynopsis dc-description"> <span class="type">float</span> <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> )</div> <p class="para rdfs-comment"> <span class="function"><strong>hypot()</strong></span> returns the length of the hypotenuse of a right-angle triangle with sides of length <em><code class="parameter">x</code></em> and <em><code class="parameter">y</code></em>, or the distance of the point (<em><code class="parameter">x</code></em>, <em><code class="parameter">y</code></em>) from the origin. This is equivalent to <em>sqrt(x*x + y*y)</em>. </p> </div> <div class="refsect1 parameters" id="refsect1-function.hypot-parameters"> <h3 class="title">Parameters</h3> <p class="para"> <dl> <dt> <span class="term"><em><code class="parameter">x</code></em></span> <dd> <p class="para"> Length of first side </p> </dd> </dt> <dt> <span class="term"><em><code class="parameter">y</code></em></span> <dd> <p class="para"> Length of second side </p> </dd> </dt> </dl> </p> </div> <div class="refsect1 returnvalues" id="refsect1-function.hypot-returnvalues"> <h3 class="title">Return Values</h3> <p class="para"> Calculated length of the hypotenuse </p> </div> </div><hr /><div class="manualnavbar" style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="function.hexdec.html">hexdec</a></div> <div class="next" style="text-align: right; float: right;"><a href="function.is-finite.html">is_finite</a></div> <div class="up"><a href="ref.math.html">Math Functions</a></div> <div class="home"><a href="index.html">PHP Manual</a></div> </div></body></html>