NAME

srandom - sets the seed for subsequent oadl::random() calls

SYNOPSIS

oadl::srandom([seed])

DESCRIPTION

The srandom() function sets the seed for the pseudo-random number generator used by random(). If the seed argument is provided, it must be an integer. If seed is omitted, the current system time is used as the seed.

RETURN VALUE

Returns nil.

ERRORS

ArgCheck if more than one argument is passed.
TypeCheck if seed is provided but is not an Int or Long.

EXAMPLE

    oadl::srandom(1234)

    oadl::random()
.740877

    oadl::srandom(1234)

    oadl::random()
.740877

SEE ALSO

random