From: Anida KHIZAR Date: Thu, 8 Oct 2020 15:21:48 +0000 (+0200) Subject: Bug with FindClosestTupleIdAlg fixed (preventing the threshold to be null) X-Git-Tag: V9_6_0b1 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=f4b90d3bed277c67cdb8fa2be01003e27f5233f9;p=tools%2Fmedcoupling.git Bug with FindClosestTupleIdAlg fixed (preventing the threshold to be null) --- diff --git a/src/MEDCoupling/MEDCouplingMemArray.cxx b/src/MEDCoupling/MEDCouplingMemArray.cxx index 3d6cc18f9..01b9c0cc1 100755 --- a/src/MEDCoupling/MEDCouplingMemArray.cxx +++ b/src/MEDCoupling/MEDCouplingMemArray.cxx @@ -119,7 +119,7 @@ void DataArrayDouble::FindTupleIdsNearTuplesAlg(const BBTreePts void DataArrayDouble::FindClosestTupleIdAlg(const BBTreePts& myTree, double dist, const double *pos, mcIdType nbOfTuples, const double *thisPt, mcIdType thisNbOfTuples, mcIdType *res) { - double distOpt(dist); + double distOpt = std::max(dist, std::numeric_limits::epsilon()); const double *p(pos); mcIdType *r(res); for(mcIdType i=0;i