Home  /  Autodocs  /  amiga.lib

NAME

FastRand
quickly generate a somewhat random integer

SYNOPSIS

number = FastRand(seed);

ULONG FastRand(ULONG);

FUNCTION

Seed value is taken from stack, shifted left one position, exclusive-or'ed with hex value $1D872B41 and returned.

INPUTS

seed
A 32-bit integer

RESULT

number
New random seed, a 32-bit value

NOTES

The statistics of this "random generator" is less than ideal.

SEE ALSO

RangeRand()

BUGS

The overall quality of the random generator leaves a lot to be deserved.