USAGE:
$var = new Rand();
$var->frand(#) - returns a Positive number between 0 and #.
example: $var->frand(5);
$var->frand(#1, #2) - returns a Positive number between #1 and #2.
example: $var->frand(15, 4);
$var->frand(#1, #2, #3) - returns a Positive floating number between
#1 and #2 when the floating part's length is maximum #3 number of digits.
example: $var->frand(15, 0, 3);
example: $var->frand(15, 4, 3);
$var->frand(#1, #2, #3, false) - the "false" indicates that the function
may also return a Negative value.
example: $var->frand(15, 0, 0, false);
example: $var->frand(15, 0, 3, false);
example: $var->frand(15, 9, 0, false);
$var->frand(#1, #2, #3, false/true, true) - the last "true" indicates
whether the function should or not leave a trace.
example: $var->frand(15, 9, 0, false, true);
example: $var->frand(15, 9, 0, true, true);
example: $var->frand(15, 0, 3, false, true);
|