Line Intersect Polygon

Determine where/if a line intersects the side(s) of a polygon. Uses vectors analysis


SVG Source:
Javascript: