public static double distance(TriangulationPoint p1, TriangulationPoint p2)
	{
		if(p1==null || p2==null)
		{
			System.err.println("Measuring distance between null point(s)");
			return Double.MAX_VALUE;
		}
		return Math.sqrt((p1.getX() - p2.getX()) * (p1.getX() - p2.getX())
				+ (p1.getY() - p2.getY()) * (p1.getY() - p2.getY()));
	}