Es6-math-sin-x

提供:Dev Guides
移動先:案内検索

ES6-Math.sin(x)関数

この関数は、xラジアンのサインを返します。

構文

Math.sin(x)

パラメータ

  • X1-数値を表します

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))

出力

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