Commit 57de0b1b authored by Sergi Hernandez's avatar Sergi Hernandez
Browse files

Added a check that in the base geometry class that the min and max S values are correct.

parent bd3cd66e
......@@ -54,12 +54,18 @@ void COpendriveGeometry::set_start_pose(TOpendriveWorldPose &pose)
void COpendriveGeometry::set_max_s(double s)
{
this->max_s=s*this->scale_factor;
if(s<this->min_s)
this->max_s=this->min_s;
else
this->max_s=s*this->scale_factor;
}
void COpendriveGeometry::set_min_s(double s)
{
this->min_s=s*this->scale_factor;
if(s>this->max_s)
this->min_s=this->max_s;
else
this->min_s=s*this->scale_factor;
}
bool COpendriveGeometry::get_local_pose(const TOpendriveTrackPose &track,TOpendriveLocalPose &local) const
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment