Skip to content

Commit 50f7676

Browse files
hansonrhansonr
authored andcommitted
nextInt, not nextLong
1 parent eb50057 commit 50f7676

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

sources/net.sf.j2s.java.core/src/java/util/concurrent/ThreadLocalRandom.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -178,9 +178,11 @@ private static long initialSeed() {
178178
;
179179

180180
private static long mix64(long z) {
181-
z = (z ^ (z >>> 33)) * 0xff51afd7ed558ccdL;
182-
z = (z ^ (z >>> 33)) * 0xc4ceb9fe1a85ec53L;
183-
return z ^ (z >>> 33);
181+
return mix32(z); // sorry -- just ints in JavaScript
182+
//
183+
// z = (z ^ (z >>> 33)) * 0xff51afd7ed558ccdL;
184+
// z = (z ^ (z >>> 33)) * 0xc4ceb9fe1a85ec53L;
185+
// return z ^ (z >>> 33);
184186
}
185187

186188
private static int mix32(long z) {

0 commit comments

Comments
 (0)