floor: add examples, say 'truncating' instead of 'rounding down'.

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@64284 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
jim winstead 2001-12-08 19:32:00 +00:00
parent d34e9ec95c
commit 7e04f85418

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.59 $ -->
<!-- $Revision: 1.60 $ -->
<reference id="ref.math">
<title>Mathematical Functions</title>
<titleabbrev>Math</titleabbrev>
@ -599,12 +599,21 @@ $binary = base_convert ($hexadecimal, 16, 2);
</funcprototype>
</funcsynopsis>
<simpara>
Returns the next lowest integer value by rounding down
Returns the next lowest integer value by truncating
<parameter>value</parameter> if neccessary.
The return value of <function>floor</function> is still of type
<type>float</type> as the value range of <type>float</type> is
<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>.