Posted By

fahrenx on 04/22/13


Tagged

java concurrency


Versions (?)

medium quality random number generator


 / Published in: Java
 

From Java Concurrency in practice

  1. static int xorShift(int y) {
  2. y ^= (y << 6);
  3. y ^= (y >>> 21);
  4. y ^= (y << 7);
  5. return y;
  6. }

Report this snippet  

You need to login to post a comment.