RandomGenerator:setState

Sets the state of the RandomGenerator, as previously obtained using RandomGenerator:getState. This can be used to reliably restore a previous state of the generator.

RandomGenerator:setState(state)

Arguments

NameTypeDescription
statestringThe serialized state.

Returns

Nothing

Notes

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

See also