-
Notifications
You must be signed in to change notification settings - Fork 1
How to use
Ricky Setiawan edited this page Jul 12, 2022
·
1 revision
The simple way to use
var rng = new Xoroshiro128plus();
var randomInt = rng.NextInt();
OR
IRNG rng = new Xoroshiro128plus();
var randomInt = rng.NextInt();
IRNG rng = new Xoroshiro128plus();
var randomUlong = rng.NextLong();
var items = int[] { 1, 2, 3, 4, 5 };
IRNG rng = new Xoroshiro128plus();
rng.Choice(items, 2); // select 2 numbers (elements) from items array.
OR
var items = int[] { 1, 2, 3, 4, 5 };
IRNG rng = new Xoroshiro128plus();
rng.Choice(items); // select only 1 number (element) from items array.
var items = int[] { 1, 2, 3, 4, 5 };
IRNG rng = new Xoroshiro128plus();
rng.Sample(items, 2);
var items = int[] { 1, 2, 3, 4, 5 };
IRNG rng = new Xoroshiro128plus();
rng.Shuffle(items);