Method
Xojo.Math.RandomInt
Warning
This item was deprecated in version 2020r2. Please use Random as a replacement.
Description
Returns a random integer in the given range (inclusive).
Notes
Uses the mersenne twister engine (aka PRNG) with the seed set using std::random_device.
Warning
An InvalidArgumentException will be raised if min is greater than max.
Sample code
Using Xojo.Math
Dim num As Int64 = RandomInt(10, 50)
Compatibility
All project types on all supported operating systems.