public static double FindMax (boolean x, double n, List<Point2D> connection_p)
	{
		double _n = 0;
		for (int i = 0; i < connection_p.size(); i++)
		{
			if(x)
			{
				double _x = connection_p.get(i).getX();
				if (_x > _n)
				{
					_n = _x;
				}
			}
			else
			{
				double _y = connection_p.get(i).getY();
				double _x = connection_p.get(i).getX();
				if (_y > _n && _x == n)
				{
					_n = _y;
				}
			}
		}
		return _n;
	}