ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/src/test/loops/LoopHelpers.java
(Generate patch)

Comparing jsr166/src/test/loops/LoopHelpers.java (file contents):
Revision 1.7 by jsr166, Thu Oct 29 23:09:07 2009 UTC vs.
Revision 1.9 by jsr166, Tue Nov 3 01:04:02 2009 UTC

# Line 53 | Line 53 | class LoopHelpers {
53       */
54      public static int compute3(int x) {
55          int t = (x % 127773) * 16807 - (x / 127773) * 2836;
56 <        return (t > 0)? t : t + 0x7fffffff;
56 >        return (t > 0) ? t : t + 0x7fffffff;
57      }
58  
59      /**
# Line 108 | Line 108 | class LoopHelpers {
108          int x = -1831433054;
109          public XorShift32Random(int seed) { x = seed;  }
110          public XorShift32Random() {
111 <            this((int)System.nanoTime() + seq.getAndAdd(129));
111 >            this((int) System.nanoTime() + seq.getAndAdd(129));
112          }
113          public int next() {
114              x ^= x << 6;
# Line 128 | Line 128 | class LoopHelpers {
128          int w = 273326509;
129          public MarsagliaRandom(int seed) { x = seed; }
130          public MarsagliaRandom() {
131 <            this((int)System.nanoTime() + seq.getAndAdd(129));
131 >            this((int) System.nanoTime() + seq.getAndAdd(129));
132          }
133          public int next() {
134              int t = x ^ (x << 11);
# Line 164 | Line 164 | class LoopHelpers {
164          public int next() {
165              long nextseed = (seed * multiplier + addend) & mask;
166              seed = nextseed;
167 <            return ((int)(nextseed >>> 17)) & 0x7FFFFFFF;
167 >            return ((int) (nextseed >>> 17)) & 0x7FFFFFFF;
168          }
169      }
170  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines