I am making this little demo that has a grid (directx application) of lines 32x32. There is this box, 32x32, which has to move randomly in the grid, alligned to it. What I do is performing a rand()%viewport.Width and Height for the x,y of the box (x,y is the position of the top-left corner of the box). The problem is, that I cant make rand() work only for randomizing values multipliers of 2, which is 32 i want. ANy ideas?
I hope you understand the question well,