Math.cos

余弦を得る

構文

Math.cos(x)

引数

x=数値

例文

<html>
<head>
<title>Math.cos</title>
</head>

<body>

<!--余弦を得るのサンプル-->
<script type="text/javascript">
document.write('3の余弦(cos)は'+Math.cos(3)+"です<br>");
document.write('-3の余弦(cos)は'+Math.cos(-3)+"です<br>");
document.write('0の余弦(cos)は'+Math.cos(0)+"です<br>");
document.write('PIの余弦(cos)は'+Math.cos(Math.PI)+"です<br>");
document.write('PI/2の余弦(cos)は'+Math.cos(Math.PI/2));
</script>

</body>
</html>

関連記事

スポンサーリンク

Firefoxでパスワードを保存するときの注意

ホームページ製作・web系アプリ系の製作案件募集中です。

上に戻る