cvs: phpdoc /en/functions math.xml

From: Date: Sat, 08 Dec 2001 19:32:00 +0000
Subject: cvs: phpdoc /en/functions math.xml
Groups: php.doc 
Request: Send a blank email to phpdoc+get-969339562@lists.php.net to get a copy of this message
jimw Sat Dec 8 14:32:00 2001 EDT Modified files: /phpdoc/en/functions math.xml Log: floor: add examples, say 'truncating' instead of 'rounding down'. Index: phpdoc/en/functions/math.xml diff -u phpdoc/en/functions/math.xml:1.59 phpdoc/en/functions/math.xml:1.60 --- phpdoc/en/functions/math.xml:1.59 Sat Nov 17 22:07:18 2001 +++ phpdoc/en/functions/math.xml Sat Dec 8 14:32:00 2001 @@ -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 @@ </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>.

« previous php.doc (#969339562) next »