 
         if (n == 0) return int(next(32));
 
+        // Eyeball Sun's documenation of java.util.Random for an explanation
+        // of this while loop.
         var bits :int, val :int;
         do {
             bits = int(next(31));

        if (seed == 0) {
            seed = uint(seedUniquifier++ + uint(Math.random() * 4294967295));
        }
        setSeed(seed);
    }


     */
    public function setSeed (seed :uint) :void
    {
        x[0] = seed;
        for (var i :int = 1; i < N; i++) {
            x[i] = imul(1812433253, x[i - 1] ^ (x[i - 1] >>> 30)) + i;
            x[i] &= 0xffffffff;
        }
        p = 0;
        q = 1;
        r = M;
    }

    /**
