I need to generate random numbers with in specified interval [max,min]
Also the random numbers should be uniformly distributed over interval, not located to particular point
Currenly I am generating as:
DWORD random= rand()%(max-min+1) + min;
From my tests random numbers are generated around one point only
Random numbers generated:
Edit (added from answers below): Ok RAND_MAX is 32767. I am on C++ windows platform.. Is there any other method to generate random numbers with uniform distribution?
Thanks in advance!