.Net Random numbers and portability
Working on fractals and procedural generation, I faced an “interesting” problem…
.Net Random does not guaranty to produce the same output with the same seed on two different platforms (Framework implementation)… See:
In most cases I need the result to be the same across platforms (I need to generate the same landscape, event if I change the machine I am working on)… So the only workarounds are to override System.Random or implement my own random number generator.
For a good random number generator example (with tests and proof), see:
Simple Random Number Generator
For the design part, I have abstract the System.Random methods with an interface IRandom then developed a “portable” random number generator:
Some unit testing then go 😉