- //Add a random number procedure (thanks Jesus Sosa)
- public int range(int min, int max)
- {
- return min + (int)(Math.random()*(max-min + 1));
- }
- public double range(double min, double max)
- {
- return min + Math.random()*(max-min);
- }
//Add a random number procedure (thanks Jesus Sosa) public int range(int min, int max) { return min + (int)(Math.random()*(max-min + 1)); } public double range(double min, double max) { return min + Math.random()*(max-min); }