code: function seedrand(seed) {
      for (var i = 0; i < randseed.length; i++) {
        randseed[i] = 0;
      }
      for (var i = 0; i < seed.length; i++) {
        randseed[i%4] = ((randseed[i%4] << 5) - randseed[i%4]) + seed.charCodeAt(i);
      }
    }
docs: Xorshift: [x, y, z, w] 32 bit values