ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/src/jdk8/java/util/SplittableRandom.java
(Generate patch)

Comparing jsr166/src/jdk8/java/util/SplittableRandom.java (file contents):
Revision 1.2 by jsr166, Mon Nov 14 16:49:56 2016 UTC vs.
Revision 1.4 by jsr166, Mon Feb 20 22:07:50 2017 UTC

# Line 375 | Line 375 | public final class SplittableRandom {
375       * may, and typically does, vary across program invocations.
376       */
377      public SplittableRandom() { // emulate defaultGen.split()
378 <        long s = defaultGen.getAndAdd(2 * GOLDEN_GAMMA);
378 >        long s = defaultGen.getAndAdd(GOLDEN_GAMMA << 1);
379          this.seed = mix64(s);
380          this.gamma = mixGamma(s + GOLDEN_GAMMA);
381      }
# Line 792 | Line 792 | public final class SplittableRandom {
792       * @return a stream of pseudorandom {@code double} values,
793       *         each with the given origin (inclusive) and bound (exclusive)
794       * @throws IllegalArgumentException if {@code streamSize} is
795 <     *         less than zero
796 <     * @throws IllegalArgumentException if {@code randomNumberOrigin}
795 >     *         less than zero, or {@code randomNumberOrigin}
796       *         is greater than or equal to {@code randomNumberBound}
797       */
798      public DoubleStream doubles(long streamSize, double randomNumberOrigin,

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines