diff --git a/Spatial_searching/include/CGAL/Orthogonal_incremental_neighbor_search.h b/Spatial_searching/include/CGAL/Orthogonal_incremental_neighbor_search.h index 932265f82ce..13eca80ece1 100644 --- a/Spatial_searching/include/CGAL/Orthogonal_incremental_neighbor_search.h +++ b/Spatial_searching/include/CGAL/Orthogonal_incremental_neighbor_search.h @@ -174,7 +174,7 @@ namespace CGAL { else{ distance_to_root= Orthogonal_distance_instance.max_distance_to_rectangle(q, - tree.bounding_box()); + tree.bounding_box(), dists); Node_with_distance *The_Root = new Node_with_distance(tree.root(), distance_to_root, dists); PriorityQueue.push(The_Root); @@ -372,10 +372,9 @@ namespace CGAL { FT diff1 = val - node->upper_low_value(); FT diff2 = val - node->lower_high_value(); if (diff1 + diff2 < FT(0.0)) { + diff1 = val - node->upper_high_value(); new_rd= Orthogonal_distance_instance.new_distance(copy_rd,dst,diff1,new_cut_dim); - - CGAL_assertion(new_rd >= copy_rd); Node_with_distance *Lower_Child = new Node_with_distance(node->lower(), copy_rd, dists); PriorityQueue.push(Lower_Child); @@ -385,8 +384,8 @@ namespace CGAL { } else { // compute new distance + diff2 = val - node->lower_low_value(); new_rd=Orthogonal_distance_instance.new_distance(copy_rd,dst,diff2,new_cut_dim); - CGAL_assertion(new_rd >= copy_rd); Node_with_distance *Upper_Child = new Node_with_distance(node->upper(), copy_rd, dists); PriorityQueue.push(Upper_Child);