Faster segment intersection test.