brownian-motion

Why are my particles drifting? ( aka Is Math.random() broken or is it my algorithm? )

Using Javascript I'm crudely simulating Brownian motion of particles, but for some reason I don't understand my particles are drifting up and to the left. The algorithm is pretty straight forward. Each particle is a div and I simply add or subtract a random number from each div's top and left position each round. I read up on Math.rand...