Commit 1673358d authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

Convert distance to float.

parent c47c1f56
...@@ -1378,6 +1378,7 @@ namespace nanoflann ...@@ -1378,6 +1378,7 @@ namespace nanoflann
const IndexType index = BaseClassRef::vind[i];// reorder... : i; const IndexType index = BaseClassRef::vind[i];// reorder... : i;
DistanceType dist = distance.evalMetric(vec, index, (DIM > 0 ? DIM : BaseClassRef::dim)); DistanceType dist = distance.evalMetric(vec, index, (DIM > 0 ? DIM : BaseClassRef::dim));
#ifdef NANOFLANN_FIRST_MATCH // Uwe Schulzweida #ifdef NANOFLANN_FIRST_MATCH // Uwe Schulzweida
dist = (float) dist;
if (dist < worst_dist || (dist <= worst_dist && index < worst_index) ) { if (dist < worst_dist || (dist <= worst_dist && index < worst_index) ) {
#else #else
if (dist < worst_dist) { if (dist < worst_dist) {
......
Markdown is supported
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