lattice_width.c: skip directions that are identical up to sign