Calculate the intersection of two lines. Either line may be considered as a line segment,
and the intersecting point is only considered valid if it lies upon the segment. Note that
Point extends Point2D.

Parameters:

p1 and p2 the coordinates of the first line.

seg1 if the first line should be considered a segment.

p3 and p4 the coordinates of the second line.

seg2 if the second line should be considered a segment.

result the point that will be filled in with the intersecting point.

Returns:

true if result was filled in, or false if the lines are parallel or the point of
intersection lies outside of a segment.

Returns less than zero if p2 is on the left hand side of the line created by
p1 and theta and greater than zero if it is on the right hand
side. In theory, it will return zero if the point is on the line, but due to rounding errors
it almost always decides that it's not exactly on the line.