RandomGenerator:getState

Returns the current state of the RandomGenerator. This can be used with RandomGenerator:setState to reliably restore a previous state of the generator.

state = RandomGenerator:getState()

Arguments

None

Returns

NameTypeDescription
statestringThe serialized state.

Notes

The seed represents the starting state of the RandomGenerator, whereas the state represents the current state of the generator.

See also