Extend range of random int by one

This commit is contained in:
auto committed 2022-09-05 19:28:37 +02:00
1 parent 49bce78498
commit 3dc3ab05a7
1 file changed
+1 -1
@@ -13,7 +13,7 @@ public class Utilities {
public static int randomOr0(int max) {
if (max <= 1)
return 0;
return new Random().nextInt(0, max - 1);
return new Random().nextInt(0, max);
}
public static int getYearDay() {