The Rx256 Object
var xosh = new Rx256()
Unlike Math::random, before you generate a random value with Xoshiro256+, you must create a new Rx256 object that will hold the state of the random number generator. Particularly if you want a repeatable sequence of numbers, it's important to have separate Rx256 objects to hold the state for each place you want to use a sequence of random values.
Set the seed to a non-zero value to generate a repeatable sequence of values. By default, the seed is 0, which uses the system clock to seed the random number generator.
Generate an integer value between 0 and range - 1. Example:
var xosh = new Rx256() var num = xosh.nextint(25) // generate a random value between 0 and 24
Generate a floating-point value between -1 and 1. Example:
var xosh = new Rx256() var num = xosh.nextfloat_bipolar() // generate a random value -1 and 1
Generate a floating-point value between 0 and 1. Example:
var xosh = new Rx256() var num = xosh.nextfloat_unipolar() // generate a random value 0 and 1