From 31425d2692635df0ed1ca765b72f35c8c1c08c25 Mon Sep 17 00:00:00 2001 From: Karthik Chandrashekara Date: Wed, 14 Jul 2021 20:09:53 +0200 Subject: [PATCH] Changed rssq to norm. --- .../+Helper/calculateDistanceFromPointToLine.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MOT Capture Process Simulation/+Helper/calculateDistanceFromPointToLine.m b/MOT Capture Process Simulation/+Helper/calculateDistanceFromPointToLine.m index 45a1244..df5c8c6 100644 --- a/MOT Capture Process Simulation/+Helper/calculateDistanceFromPointToLine.m +++ b/MOT Capture Process Simulation/+Helper/calculateDistanceFromPointToLine.m @@ -2,7 +2,7 @@ function ret = calculateDistanceFromPointToLine(p0 , p1, p2) p01 = p0 - p1; p12 = p2 - p1; CrossProduct = [p01(2)*p12(3) - p01(3)*p12(2), p01(3)*p12(1) - p01(1)*p12(3), p01(1)*p12(2) - p01(2)*p12(1)]; - ret = rssq(CrossProduct) / rssq(p12); + ret = norm(CrossProduct) / norm(p12); %Height of parallelogram (Distance between point and line) = Area of parallelogram / Base %Area = One side of parallelogram X Base