wren
wren copied to clipboard
Remove `randomSeed1()`'s reliance on cstdlib's rand implementation.
This adds a simple TLCG to initialize the random state when only a number is supplied as seed.
This has the result of removing the reliance on cstdlib's srand()
/rand()
implementations for setting the initial state, meaning that the same seed value will have the same effect regardless of platform.
Proposed as a solution for #1098
For consistencies sake wouldn't it make sense to do the same thing for randomSeed0()
? Using time as the seed value?