Random Number Generator Bug

Hi, I use random number to move some objects in my game.
I set the velocities to be a random number within the range [-2,+2],
but the objects move with negative velocities.
I think that the range is set [min,max), in other words, the minimum value is increased, but the maximum is not.
Trying v = [-2,3) work’s well, but more test are needed.

The game:
http://flowlab.io/game/view/260991

shows this behaviour. The black object has velocities [-2,+2], while the red one has [-2,3).
The black one goes to the left upper corner and stay there, while the red keeps moving around.

That’s not the case… The reason they move left is the velocities are negative…
As for the black and red object… if you use the same generator for the velocities, it only goes up/left down/right… Try using two different generators

I did it,
Black behaviour:
black

Red behaviour:
red

Initially we have this situation:initial

And after some time…
sometime

UM PORTUGUS OU BR YUPII

opa! sou Br :slight_smile:

WHAT?!?

oh sorry! we wrote in portuguese.

You dont understand portuguese @jngthree just forget

legal ver um br por aqui!

podes crer! Vamos abrir um outro tpico para falarmos em portugues numa boa,
afinal tem gente q vai querer ver esse random number!

i guess i could use google translate… I ONLY KNOW JAPANESE AND SPANISH AND THE LAUNGUAGE IM USING RIGHT NOW