moveToRandomAngle method

Particle moveToRandomAngle()

Move the particle

This method is used to move the particle. It calculates the next position of the particle based on the current position, speed, and angle.

Implementation

Particle moveToRandomAngle() {
  return moveWithAngle(angle).copyWith(
    // Random angle
    angle: angle + (Random().nextDouble() - 0.5),
  );
}