Redefining Math.radom to a form that can be used in kernels
(trying to fix how particle structure tends to degenerate as particles
are repositioned after leaving the simulation volume)