A class for generation pseudo-random numbers.
    public class RandomNumberGenerator : Reference

Inheritance Chain


    public RandomNumberGenerator()


    public int Seed { get; set; }

The seed used by the random number generator. A given seed will give a reproducible sequence of pseudo-random numbers.


    public int GetSeed()

Getter for Seed

    public float Randf()

Generates pseudo-random float between ‘0.0’ and ‘1.0’.

    public float RandfRange(float from, float to)

Generates pseudo-random float between from and to.

    public int Randi()

Generates pseudo-random 32-bit unsigned integer between ‘0’ and ‘4294967295’.

    public int RandiRange(int from, int to)

Generates pseudo-random 32-bit signed integer between from and to (inclusive).

    public void Randomize()

Setups a time-based seed to generator.

    public void SetSeed(int seed)

Setter for Seed