A linear congruential random number generator.
More...
#include <random.h>
|
| static void | Seed (unsigned int seed) |
| | Seed the generator.
|
| static int | Range (int low, int high) |
| | Draw a number from a range, advancing the generator two steps.
|
A linear congruential random number generator.
The class has no RTTI, and its name is inferred from its role. Every member is static. The synthesiser seeds it and never draws from it.
◆ Seed()
| void Random::Seed |
( |
unsigned int | seed | ) |
|
|
static |
Seed the generator.
- Parameters
-
- Ghidra address:
- NTSC-U/C: 0x000060f0
- Ghidra address:
- PAL: 0x000060f0
◆ Range()
| int Random::Range |
( |
int | low, |
|
|
int | high ) |
|
static |
Draw a number from a range, advancing the generator two steps.
- Parameters
-
| low | Smallest result. |
| high | One past the largest result. |
- Returns
- A number from
low up to but not including high.
- Ghidra address:
- NTSC-U/C: 0x000060fc
- Ghidra address:
- PAL: 0x000060fc
The documentation for this class was generated from the following file: