Directed immersions of closed manifolds