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

A propriedade Math.SQRT1_2 representa a raiz quadrada de 12\frac{1}{2}, que é aproximadamente 0.707:

+ +

Math.SQRT1_2=12=120.707\mathtt{\mi{Math.SQRT1_2}} = \sqrt{\frac{1}{2}} = \frac{1}{\sqrt{2}} \approx 0.707

+ +
{{js_property_attributes(0, 0, 0)}}
+ +

Descrição

+ +

Por SQRT1_2 ser um método estático de Math, deve-se sempre usá-lo como Math.SQRT1_2(), e não como um método de um objeto Math que você criou.

+ +

Exemplos

+ +

Usando Math.SQRT1_2

+ +

A função a seguir retorna 1 sobre a raiz quadrada de 2:

+ +
function getRoot1_2() {
+  return Math.SQRT1_2;
+}
+
+getRoot1_2(); // 0.7071067811865476
+
+ +

Especificações

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
SpecificationStatusComment
{{SpecName('ES1')}}{{Spec2('ES1')}}Initial definition. Implemented in JavaScript 1.0.
{{SpecName('ES5.1', '#sec-15.8.1.7', 'Math.SQRT1_2')}}{{Spec2('ES5.1')}} 
{{SpecName('ES6', '#sec-math.sqrt1_2', 'Math.SQRT1_2')}}{{Spec2('ES6')}} 
{{SpecName('ESDraft', '#sec-math.sqrt1_2', 'Math.SQRT1_2')}}{{Spec2('ESDraft')}} 
+ +

Compatibilidade nos navegadores

+ + + +

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

+ +

Veja também

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