Set next sample's level based on previous level

This commit is contained in:
Thorsten Sommer 2020-09-30 20:20:20 +02:00
parent 19eb4b5f4e
commit 3c7713ae00

View File

@ -40,7 +40,7 @@ namespace FastRng.Double
if (this.samples[nextBucket] >= this.threshold) if (this.samples[nextBucket] >= this.threshold)
{ {
this.samples[nextBucket] = 0.0; this.samples[nextBucket] -= this.threshold;
return nextNumber; return nextNumber;
} }
} }