setVelocity method

void setVelocity(
  1. double vx,
  2. double vy
)

Implementation

void setVelocity(double vx, double vy) {
  this.vx = vx;
  this.vy = vy;
  particles = List<Particle?>.filled(numParticles, null);
  init();
}