path.push_back(c);
return path;
}
- if (c.h() < this->h()) {
+ double sx = c.x() + 10.0 * cos(this->h());
+ double sy = c.y() + 10.0 * sin(this->h());
+ double cx = c.x() + 10.0 * cos(c.h());
+ double cy = c.y() + 10.0 * sin(c.h());
+ if (Point(cx, cy).on_right_side_of(
+ Line(Point(c.x(), c.y()), Point(sx, sy)))) {
return std::vector<BicycleCar>();
}
c.next();