private Point vicinity(Line l){ //return value of crossing point if mouse is near enough
			float x1 = vertices[l.a].x,
				y1 = vertices[l.a].y,
				x2 = vertices[l.b].x,
				y2 = vertices[l.b].y,
				x3 = mouseX,
				y3 = mouseY,
				x4, y4,
				x, y;
			if(x2 == x1){
				x4 = mouseX +10;
				y4 = mouseY;
			}else if(y2 == y1){
				x4 = mouseX;
				y4 = mouseY + 10;
			}else{
				x4 = mouseX + 10;
				y4 = mouseY + (-(1/(y2-y1)/(x2-x1))*10); 
			}
				
			float delta = (x2-x1)*(y3-y4)-(x3-x4)*(y2-y1);
			float deltaNi = (x3-x1)*(y3-y4)-(x3-x4)*(y3-y1);
			float ni = deltaNi/delta; //jeżeli odcinki są równoległe ni = infinity || NaN
			x = (1-ni)*x1+ni*x2;
			y = (1-ni)*y1+ni*y2;
			if(ni<1 && ni>0 && (Math.abs(x-x3)*Math.abs(x-x3)+Math.abs(y-y3)*Math.abs(y-y3)) < Math.pow((SMALL-1)/2, 2)){ //POTĘGA ODLEGŁOŚCI OD LINII!!!??
				return new Point((int)x, (int)y);
			}else return new Point(-1, -1);
		}