Xojo.Math.RandomInt

From Xojo Documentation

Method

Xojo.Math.RandomInt(min As Int64, max As Int64) As Int64

Supported for all project types and targets.

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.

Exceptions

Sample Code

Using Xojo.Math
Dim num As Int64 = RandomInt(10, 50)