View Single Post
Codemonkey's Avatar Codemonkey Codemonkey is offline Super Moderator 2006-11-05 #13 Old  
011 - Quick random number
 
If you quickly need a random number in a certain range, then you can use this simple (util) function:

ActionScript Code:
  1. function randomNum(min, max):Number {
  2.         return min + Math.round(Math.random() * (max - min));
  3.     }