Hi All,
I have no problem generating my random numbers. I'm using the Win API for GetTickCount instead of VB's Randomize and Rnd functions (which stink).
What I would like to do, for example, is if I wanted to generate a random number between 1 & 10 but in certain instances, would like to have a greater chance of hitting a high number, say 8,9 or 10.
So I would like the user to be able to put a "weight" between 1 & 100 (50 would be average) to give the function a greater chance of hitting one of these high numbers
Has anyone done this before?
Any suggestions would be appreciated.
I have no problem generating my random numbers. I'm using the Win API for GetTickCount instead of VB's Randomize and Rnd functions (which stink).
What I would like to do, for example, is if I wanted to generate a random number between 1 & 10 but in certain instances, would like to have a greater chance of hitting a high number, say 8,9 or 10.
So I would like the user to be able to put a "weight" between 1 & 100 (50 would be average) to give the function a greater chance of hitting one of these high numbers
Has anyone done this before?
Any suggestions would be appreciated.