randomSpeed method

double randomSpeed()

Implementation

double randomSpeed() {
  double speed = getDouble(minSpeed, maxSpeed);
  double direction = rm.nextInt(2) == 0 ? -1 : 1;
  return speed * direction;
}