cosintermediate// Cosine of an angle in radians
Math.cos(0) // β 1
Math.cos(Math.PI) // β -1Use Math.cos() to compute the cosine of an angle (in radians) for trigonometry and graphics.
Math.cos(Math.PI / 3) returns approximately 0.5 (cos 60Β° = 0.5).
Challenge: Verify that Math.cos(Math.PI / 3) is approximately 0.5.