I wrote this function to get a pseudo random float between 0 .. 1 inclusive:
float randomFloat() { float r = (float)rand()/(float)RAND_MAX; retur
You have to initialize a random seed with
void srand ( unsigned int seed );
You can take for example the system time.