Fix definition of cosThetaL, genCosThetaL.