From 63fcbcddd35c8896df5f5cc1882c3a985c3c2f72 Mon Sep 17 00:00:00 2001 From: Mikhail Kiselyov Date: Fri, 19 Apr 2024 16:18:57 +0300 Subject: [PATCH] remove redundant normalization --- octreelib/ransac/util.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/octreelib/ransac/util.py b/octreelib/ransac/util.py index 5890a62..9f6874e 100644 --- a/octreelib/ransac/util.py +++ b/octreelib/ransac/util.py @@ -19,11 +19,8 @@ def measure_distance(plane, point): :param plane: Plane coefficients. :param point: Point coordinates. """ - return ( - math.fabs( - plane[0] * point[0] + plane[1] * point[1] + plane[2] * point[2] + plane[3] - ) - / (plane[0] ** 2 + plane[1] ** 2 + plane[2] ** 2) ** 0.5 + return math.fabs( + plane[0] * point[0] + plane[1] * point[1] + plane[2] * point[2] + plane[3] )