title: Why chrome crashes?
body: <p>hi :) why chrome tab crashes with math.random? this code is for a casual placement of object in a matrix, but chrome crashed and can't understand the reason... thanks for help and sorry for bad english</p>
  
  <pre><code>function posOggetti(oggetto, numOggetti)
          {
              var count = 0;
              while(count &lt; numOggetti)
              {
                  if(posOggetto(oggetto))
                      count++;
              }
          }
  
          function posOggetto(oggetto)
          {
              var x = generaIntero(8-1);
              var y = generaIntero(12-1);
              if(piano[x][y] == 0)
              {
                  piano[x][y] = oggetto;
                  return true;
              }
              return false;
          }
  
          function generaIntero(N)
          {
              var r = Math.random() * N;
              var ri = Math.round(r);
              return ri
          }
  </code></pre>