From da78a9e329e272dedb2400b79a3bdeebff387d47 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:42:17 -0500 Subject: initial commit --- .../reference/global_objects/math/acos/index.html | 94 ++++++++++++++++++++++ 1 file changed, 94 insertions(+) create mode 100644 files/it/web/javascript/reference/global_objects/math/acos/index.html (limited to 'files/it/web/javascript/reference/global_objects/math/acos') diff --git a/files/it/web/javascript/reference/global_objects/math/acos/index.html b/files/it/web/javascript/reference/global_objects/math/acos/index.html new file mode 100644 index 0000000000..b872e04ab2 --- /dev/null +++ b/files/it/web/javascript/reference/global_objects/math/acos/index.html @@ -0,0 +1,94 @@ +--- +title: Math.acos() +slug: Web/JavaScript/Reference/Global_Objects/Math/acos +translation_of: Web/JavaScript/Reference/Global_Objects/Math/acos +--- +
{{JSRef}}
+ +

La funzione Math.acos() ritorna l'arcocoseno (in radianti) di un numero, ovvero

+ +

x[-1;1],Math.acos(x)=arccos(x)= the unique y[0;π]such thatcos(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

+ +

Sintassi

+ +
Math.acos(x)
+ +

Parametri

+ +
+
x
+
Un numero.
+
+ +

Valore di ritorno

+ +

L'arcocoseno (in radianti) del numero passato come parametro se quest'ultimo si trova tra i valori -1 e 1; altrimenti ritorna {{jsxref("NaN")}}.

+ +

Descrizione

+ +

Il metodo Math.acos() ritorna un valore numerico compreso tra 0 and π radianti per x compreso tra -1 e 1. Se il valore di x si trova al di fuori di questo range il metodo ritorna {{jsxref("NaN")}}.

+ +

Siccome acos() è un metodo statico di Math, viene sempre usato come Math.acos() piuttosto che come metodo di un oggetto Math creato in precedenza (Math non è un costruttore).

+ +

Esempi

+ +

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 valori inferiori a -1 o maggiori di 1, Math.acos() ritorna {{jsxref("NaN")}}.

+ +

Specifiche

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
SpecificaStatoCommento
{{SpecName('ES1')}}{{Spec2('ES1')}}Definizione iniziale. Implementata in 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')}} 
+ +

Compatibilità dei Browser

+ + + +

{{Compat("javascript.builtins.Math.acos")}}

+ +

Vedi anche

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