JS Built-ins
← Math188 / 215
Mathsinintermediate

Math.sin() β€” sin(Ο€) β‰ˆ 0

πŸ“– Usage Example
// Sine of an angle in radians
Math.sin(0)            // β†’ 0
Math.sin(Math.PI / 2)  // β†’ 1

Use Math.sin() to compute the sine of an angle in radians for trigonometry and wave simulations.

Math.sin()

Returns the sine of a number (in radians).

Challenge: Observe that Math.sin(Math.PI) returns a value very close to 0 (floating-point approximation).

πŸ’‘ Hints (1)
  • β€’ sin(Ο€) = 0 mathematically, but floating-point gives a tiny near-zero value