code: public Coordinate getIntersectionSegments(LineSegment lineSegment) {
  		// http://local.wasp.uwa.edu.au/~pbourke/geometry/lineline2d/
  		double x1 = this.x1();
  		double y1 = this.y1();
  		double x2 = this.x2();
  		double y2 = this.y2();
  		double x3 = lineSegment.x1();
  		double y3 = lineSegment.y1();
  		double x4 = lineSegment.x2();
  		double y4 = lineSegment.y2();
  
  		double denom = (y4 - y3) * (x2 - x1) - (x4 - x3) * (y2 - y1);
  		if (denom == 0) {
  			return null;
  		}
  
  		double u1 = ((x4 - x3) * (y1 - y3) - (y4 - y3) * (x1 - x3)) / denom;
  		if (u1 <= 0 || u1 >= 1) {
  			return null;
  		}
  		double u2 = ((x2 - x1) * (y1 - y3) - (y2 - y1) * (x1 - x3)) / denom;
  		if (u2 <= 0 || u2 >= 1) {
  			return null;
  		}
  		double x = x1 + u1 * (x2 - x1);
  		double y = y1 + u1 * (y2 - y1);
  		return new Coordinate(x, y);
  	}
docs: Return the intersection point of 2 line segments if they intersect in 1 point.
  
  @param lineSegment
  The other LineSegment.
  @return A {@link Coordinate} representing the intersection point (so on both line segments), null if segments are
  not intersecting or corresponding lines are coinciding.