Date: 10/15/01
- Next message: Zak Greant: "Re: [PHP-DOC] hebrew translation ?"
- Previous message: Shlomi Loubaton: "[PHP-DOC] hebrew translation ?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
zak Mon Oct 15 18:51:36 2001 EDT
Modified files:
/phpdoc/en/functions math.xml
Log:
Minor fix to the *srand make_seed() function
Index: phpdoc/en/functions/math.xml
diff -u phpdoc/en/functions/math.xml:1.54 phpdoc/en/functions/math.xml:1.55
--- phpdoc/en/functions/math.xml:1.54 Fri Sep 21 18:47:42 2001
+++ phpdoc/en/functions/math.xml Mon Oct 15 18:51:36 2001
@@ -1,5 +1,5 @@
<?xml encoding="iso-8859-1"?>
-<!-- $Revision: 1.54 $ -->
+<!-- $Revision: 1.55 $ -->
<reference id="ref.math">
<title>Mathematical Functions</title>
<titleabbrev>Math</titleabbrev>
@@ -796,8 +796,8 @@
<programlisting role="php">
// seed with microseconds
function make_seed() {
- list($usec,$sec) = explode(" ", microtime());
- return ((float)$sec+(float)$usec) * 100000;
+ list($usec, $sec) = explode(' ', microtime());
+ return (float) $sec + ((float) $usec * 100000);
}
mt_srand(make_seed());
$randval = mt_rand();
@@ -1229,8 +1229,8 @@
<programlisting role="php">
// seed with microseconds
function make_seed() {
- list($usec,$sec) = explode(" ", microtime());
- return ((float)$sec+(float)$usec) * 100000;
+ list($usec, $sec) = explode(' ', microtime());
+ return (float) $sec + ((float) $usec * 100000);
}
srand(make_seed());
$randval = rand();
- Next message: Zak Greant: "Re: [PHP-DOC] hebrew translation ?"
- Previous message: Shlomi Loubaton: "[PHP-DOC] hebrew translation ?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

