The Conroy & Conroy Subroutine Library (2021.3 edition)

TSRNG16
What: function
File: Randoms
Layer: 1
Platforms: C++, C#, Javascript, Pascal (Object), PHP, Python

This class implements a random number generator that repeats every 65536 values. All psuedorandom number generation involves a seed value which indicates the starting position in the random sequence. Setting the seed to a specific value allows a sequence to be repeated. Note that in Python, PHP, and Javascript, this is an alias for the TSRNG32 class. The methods in the class are:

Read
int16 Generate()
function Generate : word
Generates a new random value and returns it.

Read
void Randomize()
procedure Randomize
Sets the seed to a random value.

Read
void Set_X( int16 _X_ )
procedure Set_X( _X_ : word )
Sets the seed to the specified value.

Read
int16 X()
function X : word
Returns the current seed value.