float x0 = this->slot().bnodes()[0]->x();
float y3 = this->slot().bnodes()[3]->y();
float x3 = this->slot().bnodes()[3]->x();
- float dy = y0 - y3;
- float dx = x0 - x3;
+ float dy = y3 - y0;
+ float dx = x3 - x0;
this->slotHeading_ = atan2(dy, dx);
// slot side
float y1 = this->slot().bnodes()[1]->y();
float x1 = this->slot().bnodes()[1]->x();
- if (sgn((x1 - x3) * (y0 - y3) - (y1 - y3) * (x0 - x3)) < 0)
+ if (sgn((x1 - x0) * (y3 - y0) - (y1 - y0) * (x3 - x0)) < 0)
this->slotSide_ = LEFT;
else
this->slotSide_ = RIGHT;
RRTNode *ParallelSlot::fposecenter()
{
- return this->slot().bnodes().front();
+ return this->slot().bnodes().back();
}
bool ParallelSlot::flast(