Correct line logic (slope and intersection).

- Horizontal lines should not have slope 0.
- Lines that touch each other in the end points don't intersect.