Browse Source

Fix bug in https://github.com/libigl/libigl/issues/1204

Alec Jacobson 5 years ago
parent
commit
79e7a05b16
1 changed files with 1 additions and 1 deletions
  1. 1 1
      include/igl/signed_distance.cpp

+ 1 - 1
include/igl/signed_distance.cpp

@@ -155,7 +155,7 @@ IGL_INLINE void igl::signed_distance(
     sqrd = dim==3?
       tree3.squared_distance(V,F,q3,low_sqr_d,up_sqr_d,i,c3):
       tree2.squared_distance(V,F,q2,low_sqr_d,up_sqr_d,i,c2);
-    if(sqrd >= up_sqr_d || sqrd <= low_sqr_d)
+    if(sqrd >= up_sqr_d || sqrd < low_sqr_d)
     {
       // Out of bounds gets a nan (nans on grids can be flood filled later using
       // igl::flood_fill)