Posted By

ypmits on 08/13/06


Tagged

number textmate actionscript random


Versions (?)

Who likes this?

6 people have marked this snippet as a favorite

jitendramr
horizens
chrisaiv
johng
ypmits
yeco


getRandomNumber


 / Published in: ActionScript
 

This will return a random number between two given numbers.

  1. public function getRandomNumber(minNum:Number,maxNum:Number):Number{
  2. return(minNum+Math.floor(Math.random()*(maxNum+1-minNum)));
  3. };

Report this snippet  

You need to login to post a comment.