Skip to content
Snippets Groups Projects
Commit 3791dc18 authored by Tristan Carrier Baudouin's avatar Tristan Carrier Baudouin
Browse files

always the same directions on edges

parent 9d066d30
No related branches found
No related tags found
No related merge requests found
...@@ -109,7 +109,7 @@ STensor3 Frame_field::search(double x,double y,double z){ ...@@ -109,7 +109,7 @@ STensor3 Frame_field::search(double x,double y,double z){
ANNidxArray indices; ANNidxArray indices;
ANNdistArray distances; ANNdistArray distances;
if(field.size()==0){ if(field.size()<=1){
return STensor3(1.0); return STensor3(1.0);
} }
...@@ -133,7 +133,7 @@ STensor3 Frame_field::search(double x,double y,double z){ ...@@ -133,7 +133,7 @@ STensor3 Frame_field::search(double x,double y,double z){
delete[] distances; delete[] distances;
#endif #endif
if(fabs(distance2-distance1)<e2){ if(fabs(sqrt(distance2)-sqrt(distance1))<e2){
if(labels[index2]<labels[index1]){ if(labels[index2]<labels[index1]){
return field[index2].second; return field[index2].second;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment