We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents c9a7015 + ce936af commit bd97990Copy full SHA for bd97990
api/src/main/java/parallelmc/parallelutils/util/RandomTools.java
@@ -7,14 +7,15 @@
7
*/
8
public class RandomTools {
9
10
+ private static final Random r = new Random();
11
+
12
/**
13
* Calculates a random integer between two integer values
14
* @param low The first integer
15
* @param high The second integer
16
* @return The random integer between low and high, inclusive
17
18
public static int betweenTwoNumbers(int low, int high) {
- Random r = new Random();
19
return r.nextInt(high - low + 1) + low;
20
}
21
0 commit comments