Ver Fonte

Reverted Math.randInt change. See discussion in 2258b069efb14a2fec6d96c161622b1c9577b09f.

Mr.doob há 10 anos atrás
pai
commit
ad50d97541
1 ficheiros alterados com 1 adições e 1 exclusões
  1. 1 1
      src/math/Math.js

+ 1 - 1
src/math/Math.js

@@ -111,7 +111,7 @@ THREE.Math = {
 
 
 	randInt: function ( low, high ) {
 	randInt: function ( low, high ) {
 
 
-		return Math.floor( this.randFloat( low, high ) );
+		return low + Math.floor( Math.random() * ( high - low + 1 ) );
 
 
 	},
 	},