Add more docs to the Splat_random macro. Change the macro to use Perl's

scaling function of rand instead of an implicit multiply.
This commit is contained in:
Colin Kuskie 2006-07-23 06:17:31 +00:00
parent 746ccf43bb
commit 7033959b5e
2 changed files with 6 additions and 5 deletions

View file

@ -35,13 +35,14 @@ used as a default.
#-------------------------------------------------------------------
sub process {
my $session = shift;
my ($temp, @param);
my ($temp, @param, $limit);
@param = @_;
if ($param[0] ne "") {
$temp = round(rand()*$param[0]);
$limit = $param[0];
} else {
$temp = round(rand()*1000000000);
$limit = 1000000000;
}
$temp = round(rand($limit));
return $temp;
}