1) Check if ray can intersect line segment (without finding intersection point for speed reasons)

Ray defined by starting point and cross point, and line segment defined by two points.

2) find intersection between ray and line segment

3) find on which side of ray (left or right) point lies

------------------

FlyFire/CodeX

http://codexorg.webjump.com