public final class Rand
extends java.lang.Object
Constructor and Description |
---|
Rand() |
Modifier and Type | Method and Description |
---|---|
static int |
between(int min,
int max)
Returns a random number between
min and max |
static boolean |
onceEvery(float seconds)
Randomly returns true approximately once every
seconds seconds. |
public static int between(int min, int max)
min
and max
Note that min and max can be negative, but max must be greater than min.
min
- the minimum number to returnmax
- the maximum number to returnpublic static boolean onceEvery(float seconds)
seconds
seconds.seconds
- the average time between events returning trueseconds