JS Built-ins
← Math46 / 215
Mathacosbeginner

Math.acos(1) Equals Zero

πŸ“– Usage Example
// Inverse cosine β€” result in radians
Math.acos(1)   // β†’ 0
Math.acos(0)   // β†’ 1.5707... (Ο€/2)

Use Math.acos() to find the angle (in radians) whose cosine equals a given value.

Math.acos(x)

Returns the arccosine (in radians) of a number. Math.acos(1) returns 0.

Challenge: Use Math.acos() and verify its result for input 1.

πŸ’‘ Hints (2)
  • β€’ cos(0) = 1, so acos(1) = 0
  • β€’ The range of acos is [0, Ο€]