From cdf6881113b0f87382a198471558b96277599be9 Mon Sep 17 00:00:00 2001 From: azizkayumov Date: Wed, 21 Jun 2023 15:59:04 +0900 Subject: [PATCH] fix point-to-node max distance --- srtree/src/measure/distance.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/srtree/src/measure/distance.rs b/srtree/src/measure/distance.rs index 6233856..b729d11 100644 --- a/srtree/src/measure/distance.rs +++ b/srtree/src/measure/distance.rs @@ -75,7 +75,7 @@ where pub fn point_to_node_max_distance(&self, point: &Point, node: &Node) -> T { let ds = self.point_to_sphere_max_distance(point, &node.sphere); let dr = self.point_to_rect_max_distance(point, &node.rect); - ds.max(dr) + ds.min(dr) } }