I read that rand() page.
I think that guy is wrong and the C.L.C site was right,
Heres the CLC fix of the problem rewritten by me with a multiply,
and you should see it works->
it simply squishes the number scale, and there is the exact same
amount of random possible samples, but the C.L.C said that it only
works when rand_max is bigger than range (it only has to be 1 integer
lower and it still works) and that is correct but they wrote it like this->
x = rand() / (RAND_MAX / RANGE + 1)
because it works with integer division and it doesnt need a float convert
(its written that way as an optimization) and its the same just with the
inverted divide instead of the multiply.
Am i wrong?
But I didnt even consider that rand()%range didnt work, i just didnt think.