Ensured, that rng gets only set when it was null
This commit is contained in:
1 parent
1110a080ac
commit
9b35ce01aa
1 file changed
+1
-1
@@ -171,7 +171,7 @@ namespace FastRng.Double
|
||||
}
|
||||
|
||||
var range = rangeEnd - rangeStart;
|
||||
distribution.Random = this;
|
||||
distribution.Random ??= this;
|
||||
|
||||
var distributedValue = await distribution.GetDistributedValue(cancel);
|
||||
return (uint) ((distributedValue * range) + rangeStart);
|
||||
|
||||
Reference in new issue
Block a user