ES6 - Fonction Math.sin (x)

Cette fonction renvoie le sinus de x radians.

Syntaxe

Math.sin(x)

Paramètre

  • X1 - représente un nombre

Exemple

console.log("---Math.sin()---") 
console.log("Math.sin(Math.PI/2): "+Math.sin(Math.PI/2)) 
console.log("Math.sin(Math.PI/4): "+Math.sin(Math.PI/4))

Production

---Math.sin()--- 
Math.sin(Math.PI/2): 1 
Math.sin(Math.PI/4): 0.7071067811865475