/ Published in: ActionScript 3
Generate a random number using parameters. If there is no parameters generate a number between 0 and 1.
Expand |
Embed | Plain Text
public function random(min:Number=0,max:Number=1):Number { return Math.floor(Math.random() * (1+max-min)) + min; }
You need to login to post a comment.
