Javascript-math-pi

提供:Dev Guides
2020年6月23日 (火) 09:40時点におけるMaintenance script (トーク | 投稿記録)による版 (Imported from text file)
(差分) ← 古い版 | 最新版 (差分) | 新しい版 → (差分)
移動先:案内検索

JavaScript-数学PIプロパティ

説明

円の円周と直径の比(約3.14159)を返します。

構文

その構文は次のとおりです-

Math.PI

次のプログラム例を試してください。

<html>
   <head>
      <title>JavaScript Math PI Property</title>
   </head>

   <body>
      <script type = "text/javascript">
         var property_value = Math.PI
         document.write("Property Value is : " + property_value);
      </script>
   </body>
</html>

出力

Property Value is : 3.141592653589793