aboutsummaryrefslogtreecommitdiff
path: root/files/fr/web/javascript/reference/global_objects/math/pi
diff options
context:
space:
mode:
authorjulieng <julien.gattelier@gmail.com>2021-08-03 08:03:23 +0200
committerSphinxKnight <SphinxKnight@users.noreply.github.com>2021-09-03 08:08:25 +0200
commitbf8e099b9c8b3c60d60b3712b4fc97b052c39887 (patch)
treec101746d082c9581c94f5937519c7d0e2f4af8cb /files/fr/web/javascript/reference/global_objects/math/pi
parent844f5103992238c0c23203286dad16a466e89c97 (diff)
downloadtranslated-content-bf8e099b9c8b3c60d60b3712b4fc97b052c39887.tar.gz
translated-content-bf8e099b9c8b3c60d60b3712b4fc97b052c39887.tar.bz2
translated-content-bf8e099b9c8b3c60d60b3712b4fc97b052c39887.zip
convert content to md
Diffstat (limited to 'files/fr/web/javascript/reference/global_objects/math/pi')
-rw-r--r--files/fr/web/javascript/reference/global_objects/math/pi/index.md85
1 files changed, 29 insertions, 56 deletions
diff --git a/files/fr/web/javascript/reference/global_objects/math/pi/index.md b/files/fr/web/javascript/reference/global_objects/math/pi/index.md
index d9aa0848db..d8f6d65a4a 100644
--- a/files/fr/web/javascript/reference/global_objects/math/pi/index.md
+++ b/files/fr/web/javascript/reference/global_objects/math/pi/index.md
@@ -9,72 +9,45 @@ tags:
translation_of: Web/JavaScript/Reference/Global_Objects/Math/PI
original_slug: Web/JavaScript/Reference/Objets_globaux/Math/PI
---
-<div>{{JSRef}}</div>
+{{JSRef}}
-<p>La propriété <code><strong>Math.PI</strong></code> représente le ratio entre le périmètre d'un cercle et son diamètre. Elle vaut environ 3.14159:</p>
+La propriété **`Math.PI`** représente le ratio entre le périmètre d'un cercle et son diamètre. Elle vaut environ 3.14159:
-<p><math display="block"><semantics><mrow><mstyle mathvariant="monospace"><mi>Math.PI</mi></mstyle><mo>=</mo><mi>π</mi><mo>≈</mo><mn>3.14159</mn></mrow><annotation encoding="TeX">\mathtt{\mi{Math.PI}} = \pi \approx 3.14159</annotation></semantics></math></p>
+<math display="block"><semantics><mrow><mstyle mathvariant="monospace"><mi>Math.PI</mi></mstyle><mo>=</mo><mi>π</mi><mo>≈</mo><mn>3.14159</mn></mrow><annotation encoding="TeX">\mathtt{\mi{Math.PI}} = \pi \approx 3.14159</annotation></semantics></math>
-<div>{{EmbedInteractiveExample("pages/js/math-pi.html")}}</div>
+{{EmbedInteractiveExample("pages/js/math-pi.html")}}{{js_property_attributes(0,0,0)}}
+## Description
+`PI` est une propriété statique de l'objet `Math` et doit toujours être utilisée avec la syntaxe `Math.PI` plutôt que d'être appelée comme la propriété d'un autre objet qui aurait été crée (`Math` n'est pas un constructeur).
-<div>{{js_property_attributes(0,0,0)}}</div>
+## Exemples
-<h2 id="Description">Description</h2>
+### Utiliser `Math.PI`
-<p><code>PI</code> est une propriété statique de l'objet <code>Math</code> et doit toujours être utilisée avec la syntaxe <code>Math.PI</code> plutôt que d'être appelée comme la propriété d'un autre objet qui aurait été crée (<code>Math</code> n'est pas un constructeur).</p>
+La fonction suivante utilise `Math.PI` afin de calculer le périmètre d'un cercle à partir du rayon passé en argument.
-<h2 id="Exemples">Exemples</h2>
+```js
+function calculPérimètre(rayon) {
+ return 2 * Math.PI * rayon;
+}
-<h3 id="Utiliser_Math.PI">Utiliser <code>Math.PI</code></h3>
+calculPérimètre(1); // 6.283185307179586
+```
-<p>La fonction suivante utilise <code>Math.PI</code> afin de calculer le périmètre d'un cercle à partir du rayon passé en argument.</p>
+## Spécifications
-<pre class="brush:js">function calculPérimètre(rayon) {
- return 2 * Math.PI * rayon;
-}
+| Spécification | Statut | Commentaires |
+| -------------------------------------------------------------------- | ---------------------------- | ----------------------------------------------------- |
+| {{SpecName('ES1')}} | {{Spec2('ES1')}} | Définition initiale. Implémentée avec JavaScript 1.0. |
+| {{SpecName('ES5.1', '#sec-15.8.1.6', 'Math.PI')}} | {{Spec2('ES5.1')}} |   |
+| {{SpecName('ES6', '#sec-math.pi', 'Math.PI')}} | {{Spec2('ES6')}} |   |
+| {{SpecName('ESDraft', '#sec-math.pi', 'Math.PI')}} | {{Spec2('ESDraft')}} |   |
+
+## Compatibilité des navigateurs
+
+{{Compat("javascript.builtins.Math.PI")}}
+
+## Voir aussi
-calculPérimètre(1); // 6.283185307179586</pre>
-
-<h2 id="Spécifications">Spécifications</h2>
-
-<table class="standard-table">
- <tbody>
- <tr>
- <th scope="col">Spécification</th>
- <th scope="col">Statut</th>
- <th scope="col">Commentaires</th>
- </tr>
- <tr>
- <td>{{SpecName('ES1')}}</td>
- <td>{{Spec2('ES1')}}</td>
- <td>Définition initiale. Implémentée avec JavaScript 1.0.</td>
- </tr>
- <tr>
- <td>{{SpecName('ES5.1', '#sec-15.8.1.6', 'Math.PI')}}</td>
- <td>{{Spec2('ES5.1')}}</td>
- <td> </td>
- </tr>
- <tr>
- <td>{{SpecName('ES6', '#sec-math.pi', 'Math.PI')}}</td>
- <td>{{Spec2('ES6')}}</td>
- <td> </td>
- </tr>
- <tr>
- <td>{{SpecName('ESDraft', '#sec-math.pi', 'Math.PI')}}</td>
- <td>{{Spec2('ESDraft')}}</td>
- <td> </td>
- </tr>
- </tbody>
-</table>
-
-<h2 id="Compatibilité_des_navigateurs">Compatibilité des navigateurs</h2>
-
-<p>{{Compat("javascript.builtins.Math.PI")}}</p>
-
-<h2 id="Voir_aussi">Voir aussi</h2>
-
-<ul>
- <li>{{jsxref("Math")}}</li>
-</ul>
+- {{jsxref("Math")}}