From 9cb9fd911e780c9bb6736203eaba62725989131a Mon Sep 17 00:00:00 2001 From: Thorsten Sommer Date: Wed, 30 Sep 2020 20:41:58 +0200 Subject: [PATCH] Added todo --- FastRng/Double/ShapeFitter.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/FastRng/Double/ShapeFitter.cs b/FastRng/Double/ShapeFitter.cs index 1a9c34c..a0c9c43 100644 --- a/FastRng/Double/ShapeFitter.cs +++ b/FastRng/Double/ShapeFitter.cs @@ -36,8 +36,12 @@ namespace FastRng.Double { var nextNumber = await this.rng.GetUniform(token); var nextBucket = (int)Math.Floor(nextNumber * this.sampleSize); + // var firstInBucket = this.samples[nextBucket] == 0; this.samples[nextBucket] += this.probabilities[nextBucket]; + // if (firstInBucket) // TODO: Could be an option (optional) + // return nextNumber; + if (this.samples[nextBucket] >= this.threshold) { this.samples[nextBucket] -= this.threshold;