&&((points[id_pointOnHull]-points[id_current]).squaredNorm()<(points[id_pointOnHull]-points[id_lastPoint]).squaredNorm()))){// 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)