Generates random integers in an inclusive range.
Both bounds are inclusive. Reversed bounds are automatically normalised.
Lower bound (inclusive); swapped with max when out of order.
max
Upper bound (inclusive); swapped with min when out of order.
min
A uniformly random integer in [min, max].
[min, max]
randomInteger(1, 3); // 1, 2, or 3randomInteger(3, 1); // same as randomInteger(1, 3) Copy
randomInteger(1, 3); // 1, 2, or 3randomInteger(3, 1); // same as randomInteger(1, 3)
Generates random integers in an inclusive range.
Both bounds are inclusive. Reversed bounds are automatically normalised.