Please note, this is a STATIC archive of website developer.mozilla.org from 03 Nov 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

Math.PI

概要

円周率。約 3.14159 です。

構文

Math.PI

詳細

PI は、静的なプロパティなので、自ら生成した Math オブジェクトのプロパティとしてではなく、常に、Math.PI として使用するようにしてください。

例: PI の使用

円周率の値を返す関数を作成し、アラートで表示する例を示します。

function getPI() {
   return Math.PI;
}

alert( getPI() );

ドキュメントのタグと貢献者

タグ: 
 このページの貢献者: teoli, ethertank, Potappo
 最終更新者: teoli,