The problem of line segment intersection seems simple enough using orientation, but the explanation in this blog leading up to formula used says one thing, and the math used is doing another.
The solution involves determining if three points are listed in a counterclockwise order. So say you have three points A, B and C. If the slope of the line AB is less than the slope of the line AC then the three points are listed in a counterclockwise order.
http://bryceboe.com/2006/10/23/line-segment-intersection-algorithm/
If you look at the function, that is not using slopes to compare as was just stated, I am not sure what he is doing. Regardless, I plugged in some test values and it does indeed work, but it is not "slope" as is described in the blog.
Am I missing something simple here?