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

A função Math.acos() retorna o arco cosseno (em radianos de um numero, sendo esse

+ +

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{ O unico } \; y \in [0; \pi] \, \text{such that} \; \cos(y) = x

+ +

Syntax

+ +
Math.acos(x)
+ +

Parâmetros 

+ +
+
Um numero.
+
+ +

Retorno

+ +

O arco cosseno(em radianos) se o valor passado como parâmetro for entre -1 e 1; caso contrario retornará {{jsxref("NaN")}}.

+ +

Description

+ +

Math.acos() metodo retorna um numero entre 0 e π radians para valores passado como parâmetros entre -1 e 1. Se o valor estiver fora dessa variação será returnado {{jsxref("NaN")}}.

+ +

Porque acos() é um metodo estático, você sempre usará Math.acos() ao invés de criar um Objecto Math(Math não é um construtor).

+ +

Examplos

+ +

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

Para valores menores que -1 ou maiores que than 1, Math.acos() o método retornrá {{jsxref("NaN")}}.

+ +

Especificações

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
SpecificationStatusComment
{{SpecName('ES1')}}{{Spec2('ES1')}}Initial definition. Implemented 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')}} 
+ +

Compatibilidade entre navegadores

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + +
FeatureChromeFirefox (Gecko)Internet ExplorerOperaSafari
Basic support{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
FeatureAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Basic support{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +

Veja também

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