Fixed reset of samples
This commit is contained in:
		
							parent
							
								
									4b8723d194
								
							
						
					
					
						commit
						c04ac3b4d4
					
				@ -36,7 +36,10 @@ namespace FastRng.Double
 | 
				
			|||||||
                this.samples[nextBucket] += this.probabilities[nextBucket];
 | 
					                this.samples[nextBucket] += this.probabilities[nextBucket];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                if (this.samples[nextBucket] >= 1.0)
 | 
					                if (this.samples[nextBucket] >= 1.0)
 | 
				
			||||||
 | 
					                {
 | 
				
			||||||
 | 
					                    this.samples[nextBucket] = 0.0;
 | 
				
			||||||
                    return nextNumber;
 | 
					                    return nextNumber;
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user