File tree Expand file tree Collapse file tree 2 files changed +22
-2
lines changed Expand file tree Collapse file tree 2 files changed +22
-2
lines changed Original file line number Diff line number Diff line change @@ -4830,6 +4830,26 @@ public final void randomSeed(long seed) {
4830
4830
}
4831
4831
4832
4832
4833
+ /**
4834
+ * Return a random integer from 0 up to (but not including)
4835
+ * the specified value for “high”. This is the same as calling random()
4836
+ * and casting the result to an <b>int</b>.
4837
+ */
4838
+ public final int choice(int high) {
4839
+ return (int) random(high);
4840
+ }
4841
+
4842
+
4843
+ /**
4844
+ * Return a random integer from “low” up to (but not including)
4845
+ * the specified value for “high”. This is the same as calling random()
4846
+ * and casting the result to an <b>int</b>.
4847
+ */
4848
+ public final int choice(int low, int high) {
4849
+ return (int) random(low, high);
4850
+ }
4851
+
4852
+
4833
4853
4834
4854
//////////////////////////////////////////////////////////////
4835
4855
Original file line number Diff line number Diff line change @@ -15,14 +15,14 @@ X https://github.com/processing/processing4/issues/544
15
15
data
16
16
X use choice() instead of random() for list classes
17
17
X remove random(PApplet) since unlikely to be used/seems overkill
18
- _ add choice() as a PApplet method for int values of random()?
18
+ X add choice() as a PApplet method for int values of random()
19
+
19
20
20
21
contrib
21
22
_ Loading SVG file gives Illegal base64 character 20 encoding error (worked in v3.5.4)
22
23
_ https://github.com/processing/processing4/issues/592
23
24
_ https://github.com/processing/processing4/issues/592
24
25
25
-
26
26
_ freeze on resize with Windows (even the default renderer)
27
27
_ https://github.com/processing/processing4/issues/507
28
28
You can’t perform that action at this time.
0 commit comments