I wrote this function to get a pseudo random float between 0 .. 1 inclusive:
float randomFloat() { float r = (float)rand()/(float)RAND_MAX; retur
Do you call it more than once? rand() will always return the same pseudo random. You might want to call srand() with some nice seed, like the current time.