How to tell whether a semi straight line intersects with a line segment?
This is required because I am writing an algorithm to check if a given point lies inside or outside a polygon.
Update
Apparently semi straight line is also known by the name of ray.
Write the parametric equations of the full line (param. $t=0$ at the origin, and then positive for the part condidered) and that of the segment (param. $s=a$ at one end, $a<s=b$ at the other).
Determine the crossing point and check if $0 \le t$ and $a \le s \le b$.