mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
pi: Document precicion directive's affect, as well as the M_PI constant.
And, some other minor changes. git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@67736 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
164fb0aafe
commit
d96c681407
1 changed files with 12 additions and 7 deletions
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.67 $ -->
|
||||
<!-- $Revision: 1.68 $ -->
|
||||
<reference id="ref.math">
|
||||
<title>Mathematical Functions</title>
|
||||
<titleabbrev>Math</titleabbrev>
|
||||
|
@ -118,9 +118,9 @@
|
|||
</tbody>
|
||||
</tgroup>
|
||||
</table>
|
||||
Only M_PI is available in PHP versions up to and including PHP4RC1.
|
||||
All other constants are available starting with PHP 4.0. Constants
|
||||
labelled [4.0.2] were added in PHP 4.0.2.
|
||||
Only M_PI is available in PHP versions up to and including PHP 4.0.0.
|
||||
All other constants are available starting with PHP 4.0.0. Constants
|
||||
labeled [4.0.2] were added in PHP 4.0.2.
|
||||
</para>
|
||||
</sect2>
|
||||
</sect1>
|
||||
|
@ -1177,14 +1177,19 @@ $randval = mt_rand();
|
|||
</funcprototype>
|
||||
</funcsynopsis>
|
||||
<simpara>
|
||||
Returns an approximation of pi.
|
||||
Returns an approximation of pi. The returned <type>float</type>
|
||||
has a precision based on the
|
||||
<link linkend="ini.precision">precision</link> directive in
|
||||
<filename>php.ini</filename>, which defaults to <literal>14</literal>.
|
||||
Also, you can use the <constant>M_PI</constant> constant which yields
|
||||
identical results to <function>pi</function>.
|
||||
</simpara>
|
||||
<para>
|
||||
<informalexample>
|
||||
<programlisting>
|
||||
<![CDATA[
|
||||
echo pi();
|
||||
// will echo 3.1415926535898
|
||||
echo pi(); // 3.1415926535898
|
||||
echo M_PI; // 3.1415926535898
|
||||
]]>
|
||||
</programlisting>
|
||||
</informalexample>
|
||||
|
|
Loading…
Reference in a new issue