intersection test for parallel directions