Limitting cosTheta to be inside [-1,1] interval