Returns the cosine of a given angle.
ฟังก์ชันนี้ทำงานใน Google Sheets เหมือนกับใน Excel — ไวยากรณ์และอาร์กิวเมนต์เดียวกัน
COS(number)The COS function calculates the cosine of an angle provided in radians. If your angle is in degrees, you must multiply it by PI()/180 or use the RADIANS function to convert it.
=COS(0)ผลลัพธ์: 1
Returns the cosine of 0 radians, which is 1.
=COS(RADIANS(60))ผลลัพธ์: 0.5
Converts 60 degrees to radians and returns the cosine, which is 0.5.
Excel expects the input to be in radians. If your input is in degrees, ensure you convert it using the RADIANS function.