The engine's pseudorandom number generator.
More...
|
| void | SetSeed (integer seed) |
| | Sets the PRNG seed.
|
| integer | GetSeed () |
| | Gets the PRNG seed.
|
| decimal | Max (number max) |
| | Gets a random number between 0.0 and a specified maximum, and advances the PRNG state.
|
| decimal | Range (number min, number max) |
| | Gets a random number between a specified minimum and a specified maximum, and advances the PRNG state.
|
The engine's pseudorandom number generator.
This is preferred over Math's random functions if you require consistency, since Random can be seeded and utilizes a defined algorithm, which functions such as Math.Random cannot guarantee.
◆ GetSeed()
| integer Random.GetSeed |
( |
| ) |
|
Gets the PRNG seed.
- Returns
- Returns an integer value.
◆ Max()
| decimal Random.Max |
( |
number | max | ) |
|
Gets a random number between 0.0 and a specified maximum, and advances the PRNG state.
- Parameters
-
| max | Maximum non-inclusive value. |
- Returns
- Returns a decimal value.
◆ Range()
| decimal Random.Range |
( |
number | min, |
|
|
number | max ) |
Gets a random number between a specified minimum and a specified maximum, and advances the PRNG state.
- Parameters
-
| min | Minimum non-inclusive value. |
| max | Maximum non-inclusive value. |
- Returns
- Returns a decimal value.
◆ SetSeed()
| void Random.SetSeed |
( |
integer | seed | ) |
|
Sets the PRNG seed.
- Parameters
-