u32 threshhold = -bound % bound;
u32 r;
- while ((r = next()) < threshhold);
+ while ((r = next()) < threshhold)
+ ;
return r % bound;
}
size_t len_alignment = (uintptr_t)out % sizeof(u32);
if (len_alignment) {
+ len -= len_alignment;
r = next();
while (len_alignment--) {
*outb = r & 0xFF;
s32 PcgRandom::randNormalDist(s32 min, s32 max, int num_trials)
{
- u32 accum = 0;
+ s32 accum = 0;
for (int i = 0; i != num_trials; i++)
accum += range(min, max);
return ((float)accum / num_trials) + 0.5f;