Browse Source

Moved GeometryUtils.random16 => Math.random16

alteredq 14 years ago
parent
commit
42544a0f29
2 changed files with 11 additions and 11 deletions
  1. 9 0
      src/core/Math.js
  2. 2 11
      src/extras/GeometryUtils.js

+ 9 - 0
src/core/Math.js

@@ -20,6 +20,15 @@ THREE.Math = {
 
 		return b1 + ( x - a1 ) * ( b2 - b1 ) / ( a2 - a1 );
 
+	},
+
+	// Get 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;
+
 	}
 
 };

+ 2 - 11
src/extras/GeometryUtils.js

@@ -4,7 +4,7 @@
  */
 
 THREE.GeometryUtils = {
-	
+
 	merge: function ( geometry1, object2 /* mesh | geometry */ ) {
 
 		var matrix, matrixRotation,
@@ -437,15 +437,6 @@ THREE.GeometryUtils = {
 
 	},
 
-	// Get 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;
-
-	},
-
 	center: function( geometry ) {
 
 		geometry.computeBoundingBox();
@@ -467,6 +458,6 @@ THREE.GeometryUtils = {
 
 };
 
-THREE.GeometryUtils.random = THREE.GeometryUtils.random16;
+THREE.GeometryUtils.random = THREE.Math.random16;
 
 THREE.GeometryUtils.__v1 = new THREE.Vector3();