Better line intersect test, avoiding division