Posted By


ypmits on 08/13/06

Statistics


Viewed 0 times

getRandomNumber


/ Published in: ActionScript

This will return a random number between two given numbers.


Copy this code and paste it in your HTML
  1. public function getRandomNumber(minNum:Number,maxNum:Number):Number{
  2. return(minNum+Math.floor(Math.random()*(maxNum+1-minNum)));
  3. };

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.