-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Convert /web/javascript/reference/global_objects/math folder to Markd…
…own (es) (#8167) * Convert /web/javascript/reference/global_objects/math folder to Markdown (es) * Apply suggestions from code review Authored: Queen Vinyl Da.i'gyu-Kazotetsu <[email protected]> Co-authored-by: GrayWolf <[email protected]>
- Loading branch information
Showing
57 changed files
with
2,079 additions
and
2,709 deletions.
There are no files selected for viewing
98 changes: 0 additions & 98 deletions
98
files/es/web/javascript/reference/global_objects/math/acos/index.html
This file was deleted.
Oops, something went wrong.
72 changes: 72 additions & 0 deletions
72
files/es/web/javascript/reference/global_objects/math/acos/index.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
--- | ||
title: Math.acos() | ||
slug: Web/JavaScript/Reference/Global_Objects/Math/acos | ||
tags: | ||
- JavaScript | ||
- Math | ||
- Métodos | ||
- Referências | ||
translation_of: Web/JavaScript/Reference/Global_Objects/Math/acos | ||
original_slug: Web/JavaScript/Referencia/Objetos_globales/Math/acos | ||
--- | ||
{{JSRef}} | ||
|
||
La función **`Math.acos()`** devuelve el arco coseno (en radianes) de un número que es | ||
|
||
<math display="block"><semantics><mrow><mo>∀</mo><mi>x</mi><mo>∊</mo><mo stretchy="false">[</mo><mrow><mo>-</mo><mn>1</mn></mrow><mo>;</mo><mn>1</mn><mo stretchy="false">]</mo><mo>,</mo><mspace width="thickmathspace"></mspace><mstyle mathvariant="monospace"><mrow><mo lspace="0em" rspace="thinmathspace">Math.acos</mo><mo stretchy="false">(</mo><mi>x</mi><mo stretchy="false">)</mo></mrow></mstyle><mo>=</mo><mo lspace="0em" rspace="0em">arccos</mo><mo stretchy="false">(</mo><mi>x</mi><mo stretchy="false">)</mo><mo>=</mo><mtext> the unique </mtext><mspace width="thickmathspace"></mspace><mi>y</mi><mo>∊</mo><mo stretchy="false">[</mo><mn>0</mn><mo>;</mo><mi>π</mi><mo stretchy="false">]</mo><mspace width="thinmathspace"></mspace><mtext>such that</mtext><mspace width="thickmathspace"></mspace><mo lspace="0em" rspace="0em">cos</mo><mo stretchy="false">(</mo><mi>y</mi><mo stretchy="false">)</mo><mo>=</mo><mi>x</mi></mrow><annotation encoding="TeX">\forall x \in [{-1};1],\;\mathtt{\operatorname{Math.acos}(x)} = \arccos(x) = \text{ the unique } \; y \in [0; \pi] \, \text{such that} \; \cos(y) = x</annotation></semantics></math> | ||
|
||
## Sintaxis | ||
|
||
Math.acos(x) | ||
|
||
### Parámetros | ||
|
||
- `x` | ||
- : Un número. | ||
|
||
### Valor devuelto | ||
|
||
El arco coseno (en radianes) de un número dado si se encuentra entre **-1** y **1**; de otro modo, {{jsxref("NaN")}}. | ||
|
||
## Descripción | ||
|
||
El método `Math.acos()` devuelve un valor numérico entre 0 y π radianes para `x` entre -1 y 1. Si el valor de `x` está fuera de este rango, devuelve {{jsxref("NaN")}}. | ||
|
||
Debido a que `acos()` es un método estático de `Math`, siempre debe usarse como `Math.acos()`, en vez de como un método de un objeto `Math` creado (`Math` no es un constructor). | ||
|
||
## Ejemplos | ||
|
||
### Usando `Math.acos()` | ||
|
||
```js | ||
Math.acos(-2); // NaN | ||
Math.acos(-1); // 3.141592653589793 | ||
Math.acos(0); // 1.5707963267948966 | ||
Math.acos(0.5); // 1.0471975511965979 | ||
Math.acos(1); // 0 | ||
Math.acos(2); // NaN | ||
``` | ||
|
||
Para valores menores que -1 o mayores que 1, `Math.acos()` devuelve {{jsxref("NaN")}}. | ||
|
||
## Especificaciones | ||
|
||
| Especificación | Estado | Comentarios | | ||
| ------------------------------------------------------------------------ | ---------------------------- | --------------------------------------------------- | | ||
| {{SpecName('ES1')}} | {{Spec2('ES1')}} | Definición inicial. Implementado en JavaScript 1.0. | | ||
| {{SpecName('ES5.1', '#sec-15.8.2.2', 'Math.acos')}} | {{Spec2('ES5.1')}} | | | ||
| {{SpecName('ES6', '#sec-math.acos', 'Math.acos')}} | {{Spec2('ES6')}} | | | ||
| {{SpecName('ESDraft', '#sec-math.acos', 'Math.acos')}} | {{Spec2('ESDraft')}} | | | ||
|
||
## Compatibilidad con navegador | ||
|
||
{{Compat("javascript.builtins.Math.acos")}} | ||
|
||
## Ver también | ||
|
||
- {{jsxref("Math.asin()")}} | ||
- {{jsxref("Math.atan()")}} | ||
- {{jsxref("Math.atan2()")}} | ||
- {{jsxref("Math.cos()")}} | ||
- {{jsxref("Math.sin()")}} | ||
- {{jsxref("Math.tan()")}} |
95 changes: 0 additions & 95 deletions
95
files/es/web/javascript/reference/global_objects/math/acosh/index.html
This file was deleted.
Oops, something went wrong.
76 changes: 76 additions & 0 deletions
76
files/es/web/javascript/reference/global_objects/math/acosh/index.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
--- | ||
title: Math.acosh() | ||
slug: Web/JavaScript/Reference/Global_Objects/Math/acosh | ||
tags: | ||
- JavaScript | ||
- Math | ||
- Referencia | ||
- metodo | ||
translation_of: Web/JavaScript/Reference/Global_Objects/Math/acosh | ||
original_slug: Web/JavaScript/Referencia/Objetos_globales/Math/acosh | ||
--- | ||
{{JSRef}} | ||
|
||
La función **`Math.acosh()`** retorna el arco coseno hiperbólico de un número que es: | ||
|
||
<math display="block"><semantics><annotation encoding="TeX">Para todo x mayor ó igual a 1,se cumple que : la funcion Math.acosh(x) = arcosh(x) = al único y mayor ó igual a 0 ; tal que; cosh(y) = x</annotation></semantics></math> | ||
|
||
## Sintaxis | ||
|
||
Math.acosh(x) | ||
|
||
### Parámetros | ||
|
||
- `x` | ||
- : Un número. | ||
|
||
### Valor retornado | ||
|
||
El arco coseno hiperbólico del número dado. Si el número es menor que 1, {{jsxref("NaN")}}. | ||
|
||
## Descripción | ||
|
||
Como `acosh()` es un método estático de `Math`, siempre debe ser usado como `Math.acosh()`, en vez de como un método de un objeto `Math` creado (`Math` no es constructor). | ||
|
||
## Ejemplos | ||
|
||
### Utilizando `Math.acosh()` | ||
|
||
```js | ||
Math.acosh(-1); // NaN | ||
Math.acosh(0); // NaN | ||
Math.acosh(0.5); // NaN | ||
Math.acosh(1); // 0 | ||
Math.acosh(2); // 1.3169578969248166 | ||
``` | ||
|
||
Para valores menores que 1 `Math.acosh()` retorna {{jsxref("NaN")}}. | ||
|
||
## Polyfill | ||
|
||
Para todo <math><semantics><mrow><mi>x</mi><mo>≥</mo><mn>1</mn></mrow><annotation encoding="TeX">x mayor ó igual a 1</annotation></semantics></math>, se tiene que el arcosh(x) <math><semantics><annotation encoding="TeX">= ln(x + la raiz cuadrada de(x cuadrado - 1)) </annotation></semantics></math> y esto puede ser emulado con la siguiente funcion: | ||
|
||
```js | ||
Math.acosh = Math.acosh || function(x) { | ||
return Math.log(x + Math.sqrt(x * x - 1)); | ||
}; | ||
``` | ||
|
||
## Especificaciones | ||
|
||
| Especificación | Status | Comentario | | ||
| ---------------------------------------------------------------------------- | ---------------------------- | ------------------- | | ||
| {{SpecName('ES6', '#sec-math.acosh', 'Math.acosh')}} | {{Spec2('ES6')}} | Definición inicial. | | ||
| {{ SpecName('ESDraft', '#sec-math.acosh', 'Math.acosh')}} | {{Spec2('ESDraft')}} | | | ||
|
||
## Compatibilidad de navegador | ||
|
||
{{Compat("javascript.builtins.Math.acosh")}} | ||
|
||
## Ver también | ||
|
||
- {{jsxref("Math.asinh()")}} | ||
- {{jsxref("Math.atanh()")}} | ||
- {{jsxref("Math.cosh()")}} | ||
- {{jsxref("Math.sinh()")}} | ||
- {{jsxref("Math.tanh()")}} |
Oops, something went wrong.