File tree 3 files changed +7
-2
lines changed
src/org/openpatch/scratch/extensions/math
3 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,10 @@ index: 4
4
4
lang : en
5
5
---
6
6
7
+ ## 4.15.2
8
+
9
+ - 🐛 Fix: Random.randomInt not return the maximum value.
10
+
7
11
## 4.15.1
8
12
9
13
- 🐛 Fix: Edge detection not working correctly.
Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ author.url=https://openpatch.org
40
40
# This is NOT a direct link to where to download it.
41
41
42
42
library.url =https://github.com/openpatch/scratch-for-java
43
- library.version =4.15.1
43
+ library.version =4.15.2
44
44
45
45
46
46
# Set the category (or categories) of your Library from the following list:
Original file line number Diff line number Diff line change @@ -132,7 +132,7 @@ public static double random() {
132
132
* @return a random integer
133
133
*/
134
134
public static int randomInt (int max ) {
135
- return getRandom ().nextInt (max );
135
+ return getRandom ().nextInt (max + 1 );
136
136
}
137
137
138
138
/**
@@ -153,6 +153,7 @@ public static double random(double max) {
153
153
* @return a random integer
154
154
*/
155
155
public static int randomInt (int min , int max ) {
156
+ max += 1 ;
156
157
return getRandom ().nextInt (max - min ) + min ;
157
158
}
158
159
You can’t perform that action at this time.
0 commit comments