File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -225,7 +225,7 @@ class Benchmark {
225225 this . height = 450 ;
226226 this . radius = 15 ;
227227
228- const rand = ( function ( ) {
228+ const randUint32 = ( function ( ) {
229229 let seed = 49734321 ;
230230 return function ( ) {
231231 // Robert Jenkins' 32 bit integer hash function.
@@ -235,13 +235,13 @@ class Benchmark {
235235 seed = ( ( seed + 0xd3a2646c ) ^ ( seed << 9 ) ) & 0xffffffff ;
236236 seed = ( ( seed + 0xfd7046c5 ) + ( seed << 3 ) ) & 0xffffffff ;
237237 seed = ( ( seed ^ 0xb55a4f09 ) ^ ( seed >>> 16 ) ) & 0xffffffff ;
238- return ( seed & 0xfffffff ) / 0x10000000 ;
238+ return ( seed & 0xfffffff ) ;
239239 } ;
240240 } ) ( ) ;
241241
242242 const buffer = new Uint32Array ( this . width * this . height ) ;
243243 for ( let i = 0 ; i < buffer . length ; ++ i )
244- buffer [ i ] = rand ( ) ;
244+ buffer [ i ] = randUint32 ( ) ;
245245
246246 this . buffer = buffer ;
247247 }
You can’t perform that action at this time.
0 commit comments