From 3c7713ae00ae73acccba39206ec90ba43c8470e4 Mon Sep 17 00:00:00 2001 From: Thorsten Sommer Date: Wed, 30 Sep 2020 20:20:20 +0200 Subject: [PATCH] Set next sample's level based on previous level --- FastRng/Double/ShapeFitter.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/FastRng/Double/ShapeFitter.cs b/FastRng/Double/ShapeFitter.cs index 43e9a8d..1a9c34c 100644 --- a/FastRng/Double/ShapeFitter.cs +++ b/FastRng/Double/ShapeFitter.cs @@ -40,7 +40,7 @@ namespace FastRng.Double if (this.samples[nextBucket] >= this.threshold) { - this.samples[nextBucket] = 0.0; + this.samples[nextBucket] -= this.threshold; return nextNumber; } }