< prev index next >

src/java.base/share/classes/java/util/concurrent/ThreadLocalRandom.java

Print this page
rev 14117 : 8145468: update java.lang APIs with new deprecations
Reviewed-by: XXX

*** 453,463 **** v1 = 2 * nextDouble() - 1; // between -1 and 1 v2 = 2 * nextDouble() - 1; // between -1 and 1 s = v1 * v1 + v2 * v2; } while (s >= 1 || s == 0); double multiplier = StrictMath.sqrt(-2 * StrictMath.log(s)/s); ! nextLocalGaussian.set(new Double(v2 * multiplier)); return v1 * multiplier; } // stream methods, coded in a way intended to better isolate for // maintenance purposes the small differences across forms. --- 453,463 ---- v1 = 2 * nextDouble() - 1; // between -1 and 1 v2 = 2 * nextDouble() - 1; // between -1 and 1 s = v1 * v1 + v2 * v2; } while (s >= 1 || s == 0); double multiplier = StrictMath.sqrt(-2 * StrictMath.log(s)/s); ! nextLocalGaussian.set(Double.valueOf(v2 * multiplier)); return v1 * multiplier; } // stream methods, coded in a way intended to better isolate for // maintenance purposes the small differences across forms.
< prev index next >