Fix random int generation
This commit is contained in:
parent
241f3afde3
commit
c350c8f911
1 changed files with 1 additions and 1 deletions
|
|
@ -65,7 +65,7 @@ namespace psemek::random
|
|||
{
|
||||
result = static_cast<ctype>(rng()) - rng_min;
|
||||
}
|
||||
if (rng_range > gen_range)
|
||||
else if (rng_range > gen_range)
|
||||
{
|
||||
ctype const gen_range_full = gen_range + 1;
|
||||
ctype const buckets = rng_range / gen_range_full;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue