From f4641f7b983b45c619d517ade42603126989f81c Mon Sep 17 00:00:00 2001 From: Jiri Vlasak Date: Mon, 11 May 2020 20:56:34 +0200 Subject: [PATCH] Fix zone border rotation circle center --- src/bcar.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/bcar.cc b/src/bcar.cc index 8ff567d..b309f8a 100644 --- a/src/bcar.cc +++ b/src/bcar.cc @@ -32,7 +32,7 @@ bool BicycleCar::drivable(const BicycleCar &bc) const return true; } else if (M_PI/2 < a_1 && a_1 <= M_PI) { // left rear BicycleCar z(*this); // zone border - z.rotate(this->ccl().x(), this->ccr().y(), h_d); + z.rotate(this->ccl().x(), this->ccl().y(), h_d); // assert z.h() == bc.h() if (bc.y() == z.y() && bc.x() == z.x()) // bc on zone border return true; @@ -46,7 +46,7 @@ bool BicycleCar::drivable(const BicycleCar &bc) const return true; } else if (0 > a_1 && a_1 >= -M_PI/2) { // right front BicycleCar z(*this); // zone border - z.rotate(this->ccr().x(), this->ccl().y(), h_d); + z.rotate(this->ccr().x(), this->ccr().y(), h_d); // assert z.h() == bc.h() if (bc.y() == z.y() && bc.x() == z.x()) // bc on zone border return true; @@ -59,7 +59,7 @@ bool BicycleCar::drivable(const BicycleCar &bc) const return true; } else if (-M_PI/2 > a_1 && a_1 >= -M_PI) { // right rear BicycleCar z(*this); // zone border - z.rotate(this->ccr().x(), this->ccl().y(), h_d); + z.rotate(this->ccr().x(), this->ccr().y(), h_d); // assert z.h() == bc.h() if (bc.y() == z.y() && bc.x() == z.x()) // bc on zone border return true; -- 2.39.2