daily pastebin goal
39%
SHARE
TWEET

Untitled

a guest Dec 11th, 2018 70 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. void xorshift(unsigned int w,unsigned int h,unsigned int **R,unsigned int seed)
  2. {
  3.     unsigned int r,k;
  4.     r=seed;
  5.     *R=malloc(sizeof(unsigned int)*(2*w*h-1));
  6.     for (k=1;k<2*w*h;k++)
  7.     {
  8.         r=r^r<<13;
  9.         r=r^r>>17;
  10.         r=r^r<<5;
  11.         (*R)[k]=r;
  12.         //printf("%u\n",r);
  13.     }
  14. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top