Fix RandomExt range generation
This commit is contained in:
parent
d826ad974a
commit
2f33036837
@ -21,7 +21,7 @@ public class RandomExt extends Random {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public int rand(int from, int to) {
|
public int rand(int from, int to) {
|
||||||
return nextInt(to - from) + from;
|
return nextInt(to - from + 1) + from;
|
||||||
}
|
}
|
||||||
|
|
||||||
public double rand(double from, double to) {
|
public double rand(double from, double to) {
|
||||||
|
Loading…
Reference in New Issue
Block a user