title: How do you check for intersection between a line segment and a line ray emanating from a point at an angle from horizontal?
body: <p>Given a line segment, that is two points (x1,y1) and (x2,y2), one point P(x,y) and an angle theta. How do we find if this line segment and the line ray that emanates from P at an angle theta from horizontal intersects or not? If they do intersect, how to find the point of intersection?</p>