Extend range of random int by one
This commit is contained in:
parent
49bce78498
commit
3dc3ab05a7
|
|
@ -13,7 +13,7 @@ public class Utilities {
|
||||||
public static int randomOr0(int max) {
|
public static int randomOr0(int max) {
|
||||||
if (max <= 1)
|
if (max <= 1)
|
||||||
return 0;
|
return 0;
|
||||||
return new Random().nextInt(0, max - 1);
|
return new Random().nextInt(0, max);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static int getYearDay() {
|
public static int getYearDay() {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user