im programming some OpenGL effect in c++.
I want to explode my grenade, and the frags must go in a random (or anything alike) direction.
Problem is that i must generate as many possible random numbers in less time possible. So the 3D direction of the particles are random.
How can I get the fragments/particles going from the center of the grenade to any random direction? Usage of the function rand() causes the fragments to go in 4 directions or so.