2D ray intersect triangle test

Detecting 2D intersection edges along tri-polygon, and collinear cases with gradient along triangular slope.