Andreas Brett
					
					4 years ago
					
						
							committed by
							
								
								GitHub
							
						 
					
				 
				
			 
		 
		
			
				
					
					No known key found for this signature in database
					
						
							GPG Key ID: 4AEE18F83AFDEB23
						
					
				
			
		
		
		
	
		
			
				 1 changed files with 
1 additions and 
1 deletions
			 
			
		 
		
			
				- 
					
					
					 
					src/util.ts
				
 
			
		
		
			
			
			
			
			
			
				
				
					
						
							
								
									
	
		
		
			
				
					| 
						
						
							
								
							
						
						
					 | 
					@ -114,7 +114,7 @@ export function getRandomInt(min: number, max: number) { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    return Math.floor(Math.random() * (max - min + 1)) + min; | 
					 | 
					 | 
					    return Math.floor(Math.random() * (max - min + 1)) + min; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					} | 
					 | 
					 | 
					} | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					export function getCryptoRandomInt(min, max) { | 
					 | 
					 | 
					export function getCryptoRandomInt(min; number, max: number) { | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					    const randomBuffer = new Uint32Array(1); | 
					 | 
					 | 
					    const randomBuffer = new Uint32Array(1); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    crypto.getRandomValues(randomBuffer); | 
					 | 
					 | 
					    crypto.getRandomValues(randomBuffer); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    let randomNumber = randomBuffer[0] / (0xffffffff + 1); | 
					 | 
					 | 
					    let randomNumber = randomBuffer[0] / (0xffffffff + 1); | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
						
					 | 
					
  |