From Michael Bourne, 3 Years ago, written in Plain Text.
Embed
  1. //Add a random number procedure (thanks Jesus Sosa)
  2. public int range(int min, int max)
  3. {
  4.   return min + (int)(Math.random()*(max-min + 1));
  5. }
  6. public double range(double min, double max)
  7. {
  8.         return min + Math.random()*(max-min);
  9.        
  10.        
  11. }