Line intersection function

neat.