Compact expression for the angular dependence of tight-binding Hamiltonian matrix elements