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)