Skip to content

Commit

Permalink
fix TestUtils.getSeed never outputs negative vals
Browse files Browse the repository at this point in the history
  • Loading branch information
esaulpaugh committed Jan 24, 2021
1 parent 5f72a8f commit 6b39c17
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/test/java/com/esaulpaugh/headlong/TestUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ public static Random seededRandom() {

public static long getSeed(final long protoseed) {
long c = protoseed * (System.nanoTime() << 1) * -System.nanoTime();
c ^= c << 32;
return c ^ (c >> 32);
c ^= c >> 32;
return c ^ (c << 33);
}

public static long pickRandom(Random r) {
Expand Down

0 comments on commit 6b39c17

Please sign in to comment.