-
Notifications
You must be signed in to change notification settings - Fork 0
GRandom
GRandom is a library that generates RNG objects. These objects provide support for seeded generation of floats and ints
- ID:
random - Accessed with:
thorium.grandom
GRandom.New(seed: integer) -> Random
Creates new Random object

Random.New(self: Random, seed: integer) -> Random
Creates new Random object

Random.GetSeed(self: Random) -> number
Get seed of Random object

Random.SetSeed(self: Random, seed: integer) -> self: Random
Set seed on Random object

Random.RandFloat(self: Random, min: number, max: number) -> number
Generates random float in range from min to max
When max is not set, min argument becomes the max, and min is set to 0
When no arguments are specified, min becomes 0, max becomes 1

Random.RandInt(self: Random, min: number, max: number) -> number
Generates random integer in range from min to max
When max is not set, min argument becomes the max, and min is set to 0
When no arguments are specified, min becomes 0, max becomes 1

Random.RandomFloat(self: Random) -> number
Generates random number in range from 0 to 1