Fixed reset of samples
This commit is contained in:
1 parent
4b8723d194
commit
c04ac3b4d4
1 file changed
+3
@@ -36,8 +36,11 @@ 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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user