note 96032 added to function.lcg-value
| From: | danieldotbauligatgmxdotde at osu1 dot php dot net | Date: | Thu, 04 Feb 2010 03:16:39 +0000 |
| Subject: | note 96032 added to function.lcg-value | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-165648@lists.php.net to get a copy of this message | ||
Choose your weapon:
<?php
function mt_randf($min, $max)
{
return $min + abs($max - $min) * mt_rand(0, mt_getrandmax())/mt_getrandmax();
}
function lcg_randf($min, $max)
{
return $min + lcg_value() * abs($max - $min);
}
function randf($min, $max)
{
return $min + rand(0,getrandmax()) / getrandmax() * abs($max - $min);
}?>
----
Server IP: 69.147.83.197
Probable Submitter: 188.107.219.97
----
Manual Page -- http://www.php.net/manual/en/function.lcg-value.php
Edit -- https://master.php.net/note/edit/96032
Del: integrated -- https://master.php.net/note/delete/96032/integrated
Del: useless -- https://master.php.net/note/delete/96032/useless
Del: bad code -- https://master.php.net/note/delete/96032/bad+code
Del: spam -- https://master.php.net/note/delete/96032/spam
Del: non-english -- https://master.php.net/note/delete/96032/non-english
Del: in docs -- https://master.php.net/note/delete/96032/in+docs
Del: other reasons-- https://master.php.net/note/delete/96032
Reject -- https://master.php.net/note/reject/96032
Search -- https://master.php.net/manage/user-notes.php