Go to the source code of this file.
|
| class | Rand |
| | Generator of pseudo-random numbers with a lagged Fibonacci sequence of 256 words. More...
|
|
| void | SeedRand (int nSeed) |
| | Reseed the shared generator.
|
| int | RandomWord () |
| | Draw a word from the shared generator.
|
| int | RandomInt (int nLow, int nHigh) |
| | Draw an integer from the shared generator.
|
| float | RandomFraction () |
| | Draw a floating-point number in [0, 1) from the shared generator.
|
| float | RandomFloat (float fLow, float fHigh) |
| | Draw a floating-point number from the shared generator.
|
◆ SeedRand()
| void SeedRand |
( |
int | nSeed | ) |
|
Reseed the shared generator.
- Parameters
-
- Ghidra address:
- NTSC-U/C: 0x002923e0
- Ghidra address:
- PAL: 0x0029bda8
◆ RandomWord()
Draw a word from the shared generator.
- Returns
- The word.
- Ghidra address:
- NTSC-U/C: 0x00292408
- Ghidra address:
- PAL: 0x0029bdd0
◆ RandomInt()
| int RandomInt |
( |
int | nLow, |
|
|
int | nHigh ) |
Draw an integer from the shared generator.
- Parameters
-
| nLow | The smallest value. |
| nHigh | One more than the largest value. |
- Returns
- The integer.
- Ghidra address:
- NTSC-U/C: 0x00292428
- Ghidra address:
- PAL: 0x0029bdf0
◆ RandomFraction()
Draw a floating-point number in [0, 1) from the shared generator.
- Returns
- The number.
- Ghidra address:
- NTSC-U/C: 0x00292450
- Ghidra address:
- PAL: 0x0029be18
◆ RandomFloat()
| float RandomFloat |
( |
float | fLow, |
|
|
float | fHigh ) |
Draw a floating-point number from the shared generator.
- Parameters
-
| fLow | The smallest value. |
| fHigh | The largest value. |
- Returns
- The number.
- Ghidra address:
- NTSC-U/C: 0x00292470
- Ghidra address:
- PAL: 0x0029be38