wavelength 1.0.0
Loading...
Searching...
No Matches
Random Class Reference

A linear congruential random number generator. More...

#include <random.h>

Static Public Member Functions

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.

Detailed Description

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.

Member Function Documentation

◆ Seed()

void Random::Seed ( unsigned int seed)
static

Seed the generator.

Parameters
seedThe seed.
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
lowSmallest result.
highOne 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: