&&((points[id_pointOnHull]-points[id_current]).sqrLength()<(points[id_pointOnHull]-points[id_lastPoint]).sqrLength()))){// if on the same line, take the closest one from ptsOnHull
if((std::find(res.begin(),res.end(),id_current)==res.end())||((res.size()>0)&&(id_current==res[0])))// only selected it if not on the list (or the first)
id_lastPoint=id_current;
}
}
//std::cout<<"new last point : "<<points[id_lastPoint]<<" id = "<<id_lastPoint<<std::endl;