title: Issues with c++ 11 mersenne_twister_engine class
body: <p>I have been trying to use the c++ 11 mersenne_twister_engine class( <a href="http://www.cplusplus.com/reference/random/mersenne_twister_engine/" rel="nofollow">http://www.cplusplus.com/reference/random/mersenne_twister_engine/</a>) to generate numbers in the interval [0,1] however I am continually getting 0 on every number.</p>
  
  <p>Here is my code snippet</p>
  
  <pre><code>unsigned seed1 = std::chrono::system_clock::now().time_since_epoch().count();   
  
  std::mt19937 generator(seed1); 
  for (int i=0; i &lt; WIDTH * HEIGHT; i++) //GENERATES THE MATRIX OF CONNECTIVITY
  {
  
      double random = generator()/generator.max();
      if ( random  &gt; VERT_CONNECTIVITY )
      vert_con[i] = 0;
      else vert_con[i] = 1;
  
  
  }
  </code></pre>
  
  <p>generator() and generator.max() seem to be working... It is just random which gives me 0! </p>
  
  <p>Thanks!</p>