Reviewers: Benedikt Meurer,
Description:
Avoid the Marsaglia effect in 3D
For a longer discussion, see the associated Chromium issue.
BUG=chromium:423311
LOG=y
Please review this at https://codereview.chromium.org/662513004/
Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Affected files (+1, -1 lines):
M src/math.js
Index: src/math.js
diff --git a/src/math.js b/src/math.js
index
f06249d2521fc8447b7eda8aab8b1b171c2b0cd8..13d030cb89c44c66f4aa715843543e9d6b414aaa
100644
--- a/src/math.js
+++ b/src/math.js
@@ -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;
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.