Try moving piont P to see what happens to the cosine and sine of the given angle.
M. Ondrus, Created with GeoGebra