From ca4a27dc076ac2a775afc8dd6467a9d43b120554 Mon Sep 17 00:00:00 2001
From: Markus Quaritsch <markus.quaritsch@tugraz.at>
Date: Tue, 3 Nov 2015 12:29:18 +0100
Subject: [PATCH] further optimization in triangle::isinside

---
 VectoCore/Utils/VectoMath.cs | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/VectoCore/Utils/VectoMath.cs b/VectoCore/Utils/VectoMath.cs
index a9fd8922ec..165bf6c095 100644
--- a/VectoCore/Utils/VectoMath.cs
+++ b/VectoCore/Utils/VectoMath.cs
@@ -230,14 +230,14 @@ namespace TUGraz.VectoCore.Utils
 			//Contract.Requires(P3 != null);
 
 			//Barycentric Technique: http://www.blackpawn.com/texts/pointinpoly/default.html
-			var p = new Point(x, y, 0);
+			//var p = new Point(x, y, 0);
 
 			var v0X = P3.X - P1.X;
 			var v0Y = P3.Y - P1.Y;
 			var v1X = P2.X - P1.X;
 			var v1Y = P2.Y - P1.Y;
-			var v2X = p.X - P1.X;
-			var v2Y = p.Y - P1.Y;
+			var v2X = x - P1.X;
+			var v2Y = y - P1.Y;
 
 			var dot00 = v0X * v0X + v0Y * v0Y;
 			var dot01 = v0X * v1X + v0Y * v1Y;
-- 
GitLab