I need code to generate a random number between -95 and 95. The code I'm currently using is seeded with the time, so when I call it over and over again rapidly, my cube (part of a game I'm working on) goes left to right, then starts over. Could someone please provide me with code that reliably creates a random number between -95 and 95? Thanks.
My Code:
void movecube(){
srand ( time(NULL) );
e = rand() % 95 + -95;
f = rand() % 95 + -95;
}