From 2258b069efb14a2fec6d96c161622b1c9577b09f Mon Sep 17 00:00:00 2001 From: "Mr.doob" Date: Tue, 4 Nov 2014 11:46:56 -0800 Subject: [PATCH] Math: randInt return value in range between low (inclusive) and high (exclusive). Thanks @AaronMeyers. --- src/math/Math.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/math/Math.js b/src/math/Math.js index ef7af15371..0af95b4de0 100644 --- a/src/math/Math.js +++ b/src/math/Math.js @@ -102,7 +102,7 @@ THREE.Math = { randInt: function ( low, high ) { - return low + Math.floor( Math.random() * ( high - low + 1 ) ); + return Math.floor( this.randFloat( low, high ) ); }, -- GitLab