I would like to use a better random number generator in dealing bridge hands. When I use rand , I don't get uniform selection. It tends to use some numbers more than others.
For example - I would like a number returned between 1-52.
The max_rand is about 32000+. The number returned is between 0-max_rand. If you mod it with 52 it is not uniform.
Any suggestions?
Thanks.
Merlinv
For example - I would like a number returned between 1-52.
The max_rand is about 32000+. The number returned is between 0-max_rand. If you mod it with 52 it is not uniform.
Any suggestions?
Thanks.
Merlinv