2002-04-15 00:12:54 +00:00
|
|
|
<?xml version="1.0" encoding="iso-8859-1"?>
|
2002-04-17 06:45:35 +00:00
|
|
|
<!-- $Revision: 1.2 $ -->
|
2002-04-15 00:12:54 +00:00
|
|
|
<!-- splitted from ./en/functions/math.xml, last change in rev 1.2 -->
|
|
|
|
<refentry id="function.floor">
|
|
|
|
<refnamediv>
|
|
|
|
<refname>floor</refname>
|
|
|
|
<refpurpose>Round fractions down</refpurpose>
|
|
|
|
</refnamediv>
|
|
|
|
<refsect1>
|
|
|
|
<title>Description</title>
|
|
|
|
<methodsynopsis>
|
|
|
|
<type>float</type><methodname>floor</methodname>
|
|
|
|
<methodparam><type>float</type><parameter>value</parameter></methodparam>
|
|
|
|
</methodsynopsis>
|
|
|
|
<simpara>
|
|
|
|
Returns the next lowest integer value by rounding down
|
|
|
|
<parameter>value</parameter> if necessary.
|
|
|
|
The return value of <function>floor</function> is still of type
|
|
|
|
<type>float</type> because the value range of <type>float</type> is
|
|
|
|
usually bigger than that of <type>int</type>.
|
|
|
|
</simpara>
|
|
|
|
<example>
|
|
|
|
<title><function>floor</function> examples</title>
|
|
|
|
<programlisting role="php">
|
|
|
|
<![CDATA[
|
|
|
|
$four = floor(4.3); // $four = 4.0;
|
|
|
|
$nine = floor(9.999); // $nine = 9.0;
|
|
|
|
]]>
|
|
|
|
</programlisting>
|
|
|
|
</example>
|
|
|
|
<simpara>
|
|
|
|
See also <function>ceil</function> and
|
|
|
|
<function>round</function>.
|
|
|
|
</simpara>
|
|
|
|
</refsect1>
|
|
|
|
</refentry>
|
|
|
|
|
|
|
|
<!-- Keep this comment at the end of the file
|
|
|
|
Local variables:
|
|
|
|
mode: sgml
|
|
|
|
sgml-omittag:t
|
|
|
|
sgml-shorttag:t
|
|
|
|
sgml-minimize-attributes:nil
|
|
|
|
sgml-always-quote-attributes:t
|
|
|
|
sgml-indent-step:1
|
|
|
|
sgml-indent-data:t
|
|
|
|
indent-tabs-mode:nil
|
|
|
|
sgml-parent-document:nil
|
|
|
|
sgml-default-dtd-file:"../../../../manual.ced"
|
|
|
|
sgml-exposed-tags:nil
|
|
|
|
sgml-local-catalogs:nil
|
|
|
|
sgml-local-ecat-files:nil
|
|
|
|
End:
|
|
|
|
vim600: syn=xml fen fdm=syntax fdl=2 si
|
|
|
|
vim: et tw=78 syn=sgml
|
|
|
|
vi: ts=1 sw=1
|
|
|
|
-->
|