-
I need some randomness
if I use srand(time(NULL)) in my initialize portion of my project (OGL, by the way), and then use rand() blah blah blah to get random colors on some QUADS I'm using they turn out the same color everytime. It like I'm seeding the generator with the same number each time. I thought time(NULL) would be the time past midnight in millis. Am I wrong?
Thanks, NOMAD
-
no, time() is the seconds since
00-00-1970 00:00:00
only seed the generator once: call srand at the start of your app and never again