Original Post
I HATE random numbers. Every single time I think I have a fine equation that should work right, I find out later it doesn't. For example, I used this function:
inline double rand01(){ return (double)rand()/(double)RAND_MAX;};
inline int rand_n(int n){ return (int)(rand01()*n);}
And, I'll use rand_n to get a random number between 0 and the argument n. It works fine for a number between say, 1 and 4, but now, I'm trying to implement random battles, and if I have a number between one and 100, then the program, for a long time will not give me battles, then every step I'll get battles for a while, then a long time without, etc etc...
Is there ANY good random number methods? I think I've heard of one using sockets, but I don't want to make the user be connected to the internet to play my game!

--Muzlack
[edited by - Muzlack on December 15, 2002 11:21:36 AM]
