From b094cf70b34cfcb0a8a61e4793180896d3e9fb37 Mon Sep 17 00:00:00 2001 From: incredibleLeitman Date: Sun, 29 Nov 2020 23:32:11 +0100 Subject: [PATCH] adapt input param notation --- Utility.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Utility.h b/Utility.h index 1bd6be0..e17dcee 100644 --- a/Utility.h +++ b/Utility.h @@ -6,9 +6,9 @@ static float sign(float x, float y, float x1, float y1, float x2, float y2) return (x - x2) * (y1 - y2) - (x1 - x2) * (y - y2); } -static float sign (const Point &p1, const Point &p2, const Point &p3) +static float sign (const Point &pt, const Point &p1, const Point &p2) { - return (p1.x() - p3.x()) * (p2.y() - p3.y()) - (p2.x() - p3.x()) * (p1.y() - p3.y()); + return (pt.x() - p2.x()) * (p1.y() - p2.y()) - (p1.x() - p2.x()) * (pt.y() - p2.y()); } static bool IsPointInTriangle(const Point &pt, const Point &p1, const Point &p2, const Point &p3)