aboutsummaryrefslogtreecommitdiff
path: root/files/es/web/javascript/reference/global_objects/math/pi
diff options
context:
space:
mode:
authorFlorian Dieminger <me@fiji-flo.de>2021-02-11 18:20:58 +0100
committerGitHub <noreply@github.com>2021-02-11 18:20:58 +0100
commit2318b37e3fd17a3e76a29b9be7d1ce82f040c3bb (patch)
tree5e640d40fd69dc380b04e01de981a345e0141ffa /files/es/web/javascript/reference/global_objects/math/pi
parent6aa6274d2ad3e22e7f5e69b1d7531a5eaeaf5666 (diff)
parent8a5554c6fae83e92b10c8dbe5b82108cb44fad6c (diff)
downloadtranslated-content-2318b37e3fd17a3e76a29b9be7d1ce82f040c3bb.tar.gz
translated-content-2318b37e3fd17a3e76a29b9be7d1ce82f040c3bb.tar.bz2
translated-content-2318b37e3fd17a3e76a29b9be7d1ce82f040c3bb.zip
Merge pull request #53 from fiji-flo/unslugging-es
Unslugging es
Diffstat (limited to 'files/es/web/javascript/reference/global_objects/math/pi')
-rw-r--r--files/es/web/javascript/reference/global_objects/math/pi/index.html127
1 files changed, 127 insertions, 0 deletions
diff --git a/files/es/web/javascript/reference/global_objects/math/pi/index.html b/files/es/web/javascript/reference/global_objects/math/pi/index.html
new file mode 100644
index 0000000000..e4bdf042d6
--- /dev/null
+++ b/files/es/web/javascript/reference/global_objects/math/pi/index.html
@@ -0,0 +1,127 @@
+---
+title: Math.PI
+slug: Web/JavaScript/Reference/Global_Objects/Math/PI
+tags:
+ - JavaScript
+ - Math
+ - Propiedad
+ - Referencia
+translation_of: Web/JavaScript/Reference/Global_Objects/Math/PI
+original_slug: Web/JavaScript/Referencia/Objetos_globales/Math/PI
+---
+<div>{{JSRef}}</div>
+
+<div>La propiedad <code><strong>Math.PI</strong></code> representa la relacion entre la longitud de la circunferencia de un circulo y su diametro, la cual es aproximadamente 3.14159.</div>
+
+<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>
+
+<div>{{js_property_attributes(0, 0, 0)}}</div>
+
+<h2 id="Descripción">Descripción</h2>
+
+<p>Debido a que PI es una propiedad estatica del modulo <strong><code>Math</code></strong>, siempre debes de utilizarla como <strong><code>Math.PI</code></strong>, en lugar de una propiedad de un objeto <strong><code>Math</code></strong> que tu hayas creado ( <strong><code>Math</code></strong> no es un constructor ).</p>
+
+<h2 id="Ejemplos">Ejemplos</h2>
+
+<h3 id="Utilizando_Math.PI">Utilizando <code>Math.PI</code></h3>
+
+<p>La siguiente función utiliza <strong><code>Math.PI</code></strong> para calcular la longitud de la circunferencia de un circulo mediante el radio del circulo proporcionado como parametro.</p>
+
+<pre class="brush: js">function calculaCircunferencia(radio) {
+ return 2 * Math.PI * radio;
+}
+
+calculaCircunferencia(1); // 6.283185307179586
+</pre>
+
+<h2 id="Especificaciones">Especificaciones</h2>
+
+<table class="standard-table">
+ <tbody>
+ <tr>
+ <th scope="col">Especificación</th>
+ <th scope="col">Estatus</th>
+ <th scope="col">Comentario</th>
+ </tr>
+ <tr>
+ <td>{{SpecName('ES1')}}</td>
+ <td>{{Spec2('ES1')}}</td>
+ <td>
+ <p>Definición inicial. Implementado en JavaScript 1.0.</p>
+ </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="Navegadores_Compatibles">Navegadores Compatibles</h2>
+
+<div>{{CompatibilityTable}}</div>
+
+<div id="compat-desktop">
+<table class="compat-table">
+ <tbody>
+ <tr>
+ <th>Caracteristica</th>
+ <th>Chrome</th>
+ <th>Firefox (Gecko)</th>
+ <th>Internet Explorer</th>
+ <th>Opera</th>
+ <th>Safari</th>
+ </tr>
+ <tr>
+ <td>Soporte Basico</td>
+ <td>{{CompatVersionUnknown}}</td>
+ <td>{{CompatVersionUnknown}}</td>
+ <td>{{CompatVersionUnknown}}</td>
+ <td>{{CompatVersionUnknown}}</td>
+ <td>{{CompatVersionUnknown}}</td>
+ </tr>
+ </tbody>
+</table>
+</div>
+
+<div id="compat-mobile">
+<table class="compat-table">
+ <tbody>
+ <tr>
+ <th>Caracteristica</th>
+ <th>Android</th>
+ <th>Chrome for Android</th>
+ <th>Firefox Mobile (Gecko)</th>
+ <th>IE Mobile</th>
+ <th>Opera Mobile</th>
+ <th>Safari Mobile</th>
+ </tr>
+ <tr>
+ <td>Soporte Basico</td>
+ <td>{{CompatVersionUnknown}}</td>
+ <td>{{CompatVersionUnknown}}</td>
+ <td>{{CompatVersionUnknown}}</td>
+ <td>{{CompatVersionUnknown}}</td>
+ <td>{{CompatVersionUnknown}}</td>
+ <td>{{CompatVersionUnknown}}</td>
+ </tr>
+ </tbody>
+</table>
+</div>
+
+<h2 id="Ver_tambien">Ver tambien</h2>
+
+<ul>
+ <li>{{jsxref("Math")}}</li>
+</ul>