c++ - 1D Noise using Mersenne twister giving different results on different devices -


i'm generating 2d terrain 1d perlin noise using mersenne twister random numbers. first thought using mersenne twister give me same results same seed on given hardware. when compare values/terrain on different devices gives me different results. (it worked ios, osx , mac, not wp8).

code:

class 1dnoisetest {     typedef std::mt19937 myrng;     myrng rng; 1dnoisetest( unsigned seed )     {         rng.seed(seed);         std::uniform_real_distribution<double> distribution(0.0,1.0);         ( unsigned = 0; < kmaxvertices; ++i )         {             r[ ] = ( distribution(rng)); error         }     } 

...

am misunderstanding mersenne twister or doing wrong? how same terrain/values on every device/hardware?

thanks time!

see question:

c++11 cross compiler/standard library random distribution reproducibility

std::uniform_real_distribution not guaranteed give same results across different compilers.


Comments

Popular posts from this blog

android - MPAndroidChart - How to add Annotations or images to the chart -

javascript - Add class to another page attribute using URL id - Jquery -

firefox - Where is 'webgl.osmesalib' parameter? -