print(Math.cos(40 * Math.PI/180)) // Client-side
print(ee.Number(40 * Math.PI/180).cos()) // Server-side (For ee.Number and ee.Image)
https://gis.stackexchange.com/questions/359702/calculate-sine-and-cosine-in-google-earth-engine

print(Math.cos(40 * Math.PI/180)) // Client-side
print(ee.Number(40 * Math.PI/180).cos()) // Server-side (For ee.Number and ee.Image)
https://gis.stackexchange.com/questions/359702/calculate-sine-and-cosine-in-google-earth-engine