From 8a2b3e51807a3bdeed20b08aaecdcf6059e18f8a Mon Sep 17 00:00:00 2001 From: Egon Schmid Date: Thu, 20 Jan 2000 16:50:07 +0000 Subject: [PATCH] That was wrong, Michael used version 3.0.6 and not 3.0.7. git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@18776 c90b9560-bf6c-de11-be94-00142212c4b1 --- functions/math.xml | 55 +++++++++++++++++++++++++++++++--------------- 1 file changed, 37 insertions(+), 18 deletions(-) diff --git a/functions/math.xml b/functions/math.xml index 5153efd652..d87ff75c81 100644 --- a/functions/math.xml +++ b/functions/math.xml @@ -534,7 +534,7 @@ $binary = base_convert($hexadecimal, 16, 2); int min - int range + int max @@ -552,22 +552,30 @@ $binary = base_convert($hexadecimal, 16, 2); url="&url.mersenne.twister;">&url.mersenne.twister;. - If called without the optional min, range arguments - mt_rand returns a pseudo-random value - between 0 and RAND_MAX. If you want a - random number between 5 and 15 (inclusive), for example, use - mt_rand (5, 11). + If called without the optional min, + max arguments mt_rand + returns a pseudo-random value between 0 and + RAND_MAX. If you want a random number + between 5 and 15 (inclusive), for example, use mt_rand + (5, 15). Remember to seed the random number generator before use with mt_srand. + + + In versions before 3.0.7 the meaning of + max was range. To + get the same results in these versions the short example should + be mt_rand (5, 11) to get a random number + between 5 und 15. + + See also mt_srand, - mt_getrandmax, - srand, - rand and - getrandmax. + mt_getrandmax, srand, + rand and getrandmax. @@ -750,22 +758,33 @@ $randval = mt_rand(); int min - int range + int max - If called without the optional min,max arguments - rand returns a pseudo-random value between 0 - and RAND_MAX. If you want a random number - between 5 and 15 (inclusive), for example, use rand(5,11). + If called without the optional min, + max arguments rand + returns a pseudo-random value between 0 and + RAND_MAX. If you want a random number + between 5 and 15 (inclusive), for example, use rand (5, + 15). Remember to seed the random number generator before use with - srand. + srand. + + + + In versions before 3.0.7 the meaning of + max was range. To + get the same results in these versions the short example should + be rand (5, 11) to get a random number + between 5 und 15. + + See also srand, - getrandmax, - mt_rand, + getrandmax, mt_rand, mt_srand and mt_getrandmax.