public static DTSweepConstraint getSharedEdge(DelaunayTriangle triangle1, DelaunayTriangle triangle2)
	{
		DTSweepConstraint result = new DTSweepConstraint(triangle1.points[0], triangle1.points[1]);
		
		TriangulationPoint[] p1 = triangle1.points;
		TriangulationPoint[] p2 = triangle2.points;
		
		boolean p1Set = false;
		
		for (int i = 0; i < p2.length; i++)
		{
			if(distance(p1[0], p2[i])<THRESHOLD)
			{
				result.p = p1[0];
				p1Set = true;
			}
		}
		for (int i = 0; i < p2.length; i++)
		{
			if(distance(p1[1], p2[i])<THRESHOLD)
			{
				if(!p1Set)
					result.p = p1[1];
				else
					result.q = p1[1];
			}
		}
		for (int i = 0; i < p2.length; i++)
		{
			if(distance(p1[2], p2[i])<THRESHOLD)
			{
				result.q = p1[2];
			}
		}
		return result;
	}