Browse Source

Math: Deprecated random16().
https://code.google.com/p/v8/issues/detail?id=4566

Mr.doob 9 years ago
parent
commit
21e2216b1b
1 changed files with 2 additions and 4 deletions
  1. 2 4
      src/math/Math.js

+ 2 - 4
src/math/Math.js

@@ -89,12 +89,10 @@ THREE.Math = {
 
 	},
 
-	// Random float from <0, 1> with 16 bits of randomness
-	// (standard Math.random() creates repetitive patterns when applied over larger space)
-
 	random16: function () {
 
-		return ( 65280 * Math.random() + 255 * Math.random() ) / 65535;
+		console.warn( 'THREE.Math.random16() has been deprecated. Use Math.random() instead.' );
+		return Math.random();
 
 	},