Avoid the Marsaglia effect in 3D
For a longer discussion, see the associated Chromium issue. BUG=chromium:423311 LOG=y R=bmeurer@chromium.org Review URL: https://codereview.chromium.org/662513004 git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24721 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
parent
3efb7bb15a
commit
8325bfbfbf
@ -144,7 +144,7 @@ function MathPow(x, y) {
|
||||
// ECMA 262 - 15.8.2.14
|
||||
var rngstate; // Initialized to a Uint32Array during genesis.
|
||||
function MathRandom() {
|
||||
var r0 = (MathImul(18273, rngstate[0] & 0xFFFF) + (rngstate[0] >>> 16)) | 0;
|
||||
var r0 = (MathImul(18030, rngstate[0] & 0xFFFF) + (rngstate[0] >>> 16)) | 0;
|
||||
rngstate[0] = r0;
|
||||
var r1 = (MathImul(36969, rngstate[1] & 0xFFFF) + (rngstate[1] >>> 16)) | 0;
|
||||
rngstate[1] = r1;
|
||||
|
Loading…
Reference in New Issue
Block a user