3 ms·
You seem to be saying that setSeed(0); setSeed(1); rand() and setSeed(1); rand() returning different values is not only a good idea but is already a thing.
by amenhotep 2y ago
You seem to be saying that
setSeed(0); setSeed(1); rand()
and
setSeed(1); rand()
returning different values is not only a good idea but is already a thing. Am I wrong?
This would confuse the hell out of me, what specifically has this behaviour?
- hinkley 2y agoIf you’re trying to create a repeatable source of randomness for unit testing for example, you would create a new PRNG for each run, not try to recycle an existing instance. You’re making assumptions about state that aren’t supportable.
- Dylan16807 2y agoThe behavior you are describing is not setting a seed. A seed should wipe out all existing state. Adding entropy is a very different operation.