wavelength 1.0.0
Loading...
Searching...
No Matches
rand.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  Rand
 Generator of pseudo-random numbers with a lagged Fibonacci sequence of 256 words. More...

Functions

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.

Function Documentation

◆ SeedRand()

void SeedRand ( int nSeed)

Reseed the shared generator.

Parameters
nSeedThe seed.
Ghidra address:
NTSC-U/C: 0x002923e0
Ghidra address:
PAL: 0x0029bda8

◆ RandomWord()

int 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
nLowThe smallest value.
nHighOne more than the largest value.
Returns
The integer.
Ghidra address:
NTSC-U/C: 0x00292428
Ghidra address:
PAL: 0x0029bdf0

◆ RandomFraction()

float 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
fLowThe smallest value.
fHighThe largest value.
Returns
The number.
Ghidra address:
NTSC-U/C: 0x00292470
Ghidra address:
PAL: 0x0029be38