Determine whether an edge crosses a node