JS Built-ins
← Math96 / 215
Mathcosbeginner

Math.cos(0) Equals 1

πŸ“– Usage Example
// Cosine of an angle in radians
Math.cos(0)          // β†’ 1
Math.cos(Math.PI)    // β†’ -1

Use Math.cos() to compute the cosine of an angle (in radians) for trigonometry and graphics.

Math.cos(x)

Returns the cosine of a number (in radians). Math.cos(0) returns 1.

Challenge: Use Math.cos() and verify its result for input 0.

πŸ’‘ Hints (2)
  • β€’ cos(0Β°) = 1 by definition
  • β€’ The cosine of 0 radians is exactly 1