From cb9e359a51c3249d8f5157db69d43fd413ddeda6 Mon Sep 17 00:00:00 2001 From: Florian Merz Date: Thu, 11 Feb 2021 14:45:12 +0100 Subject: unslug ca: move --- .../reference/global_objects/math/acos/index.html | 131 +++++++++++++++++++++ 1 file changed, 131 insertions(+) create mode 100644 files/ca/web/javascript/reference/global_objects/math/acos/index.html (limited to 'files/ca/web/javascript/reference/global_objects/math/acos/index.html') diff --git a/files/ca/web/javascript/reference/global_objects/math/acos/index.html b/files/ca/web/javascript/reference/global_objects/math/acos/index.html new file mode 100644 index 0000000000..fdf781a4e2 --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/math/acos/index.html @@ -0,0 +1,131 @@ +--- +title: Math.acos() +slug: Web/JavaScript/Referencia/Objectes_globals/Math/acos +translation_of: Web/JavaScript/Reference/Global_Objects/Math/acos +--- +
{{JSRef("Global_Objects", "Math")}}
+ +

Resum

+ +

La funció Math.acos() retorna l'arccosinus (mesurat en radians) d'un nombre, és a dir:x[-1;1],Math.acos(x)=arccos(x)= l'únic y[0;π]tal quecos(y)=x\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

+ +

Sintaxi

+ +
Math.acos(x)
+ +

Paràmetres

+ +
+
x
+
Un nombre.
+
+ +

Descripció

+ +

El mètode Math.acos() retorna un valor numèric entre 0 i π radians per a x entre -1 i 1. Si el valor de x està fora d'aquest rang, retorna {{jsxref("NaN")}}.

+ +

Degut a que acos() és un mètode estàtic de Math, sempre s'utilitza com a Math.acos(), en comptes de com a mètode d'una instància de Math (Math no és un constructor).

+ +

Exemples

+ +

Exemple: Utilitzar Math.acos()

+ +
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
+
+ +

Per a valors menors que -1 o majors que 1, Math.acos() retorna {{jsxref("NaN")}}.

+ +

Especificacions

+ + + + + + + + + + + + + + + + + + + + + + + + +
EspecificacióEstatComentaris
ECMAScript 1a Edició.StandardDefinició inicial. Implementat a 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')}} 
+ +

Compatibilitat amb navegadors

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +

Vegeu també

+ + -- cgit v1.2.3-54-g00ecf