initPosition method

  1. @protected
void initPosition(
  1. Particle p
)

Initializes a new position for the provided Particle.

Implementation

@protected
void initPosition(Particle p) {
  p.cx = random.nextDouble() * size!.width;
  p.cy = random.nextDouble() * size!.height;
}