An intersection is considered to be inbound if the edge of the Subject polygon containing it transitions from the outside of the Clip polygon to the inside of the Clip polygon when following the vertices of the Subject polygon in order (i.e., in the counter-clockwise direction).
In this particular implementation, the sign of the dot product between the line segment of the Subject polygon and the outward facing normal of the line segment of the Clip polygon is used to determine if an intersection is inbound. If the dot product is negative, there is a greater than 90 degree difference, which means that the line is entering the polygon, not leaving it. This test is particularly useful as this value is already calculated as part of computing the intersection point.