Corrected typo in the cosine interpolation function