Extend range of random int by one

This commit is contained in:
Teriuihi 2022-09-05 19:28:37 +02:00
parent 49bce78498
commit 3dc3ab05a7

View File

@ -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() {