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:
parent
746ccf43bb
commit
7033959b5e
2 changed files with 6 additions and 5 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue