hi,
I was wondering how would you generate random positions between -100 to 0 as well as 800 to 900
for example this is the code I have
(*currentIter).SetPosition(rand()% -100+0, rand()% 600);
and it sets the sprites position between 100 and 0
and the code below sets the sprite position between 800 and 900
(*currentIter).SetPosition(rand()%800 + 900, rand()% 600);
The question is how can I randomly choose between the both of these lines of code?
i tried:
(*currentIter).SetPosition(rand()%(-100 + 0)||(800 + 900), rand()% 600);
but that didn't work.