For a previous game project, I needed a nice line segment intersection detection algorithm. It was surprisingly difficult to find a good one in C#, but I found one in C++ that I converted.
As it turns out, my upcoming game makes heavy use of this algorithm as well. So here it is in case anyone else needs it. This version is a little sloppy in that it uses 3D constructs despite checking 2D intersections, but it would be simple to convert this to its 2D counterpart.