title: Java restrict random double
body: <p>I have a simple question and I'm a little rusty on random number generation. I want to generate large odd integers (I'm using doubles since my numbers could be outside the int range) and I can't quite figure out how to get rid of the decimals in the random number generation and have the number be odd. </p>
  
  <p>Right now I just have: </p>
  
  <pre><code>N = nMin + (nMax - nMin) * rand.nextDouble();
  </code></pre>
  
  <p>Which as I said gives me any random number (with decimals) between nMin and nMax. Any help would be much appreciated! </p>