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/sin/index.html | 92 ++++++++++++++++++++++ 1 file changed, 92 insertions(+) create mode 100644 files/pt-br/web/javascript/reference/global_objects/math/sin/index.html (limited to 'files/pt-br/web/javascript/reference/global_objects/math/sin') diff --git a/files/pt-br/web/javascript/reference/global_objects/math/sin/index.html b/files/pt-br/web/javascript/reference/global_objects/math/sin/index.html new file mode 100644 index 0000000000..3e5cdea187 --- /dev/null +++ b/files/pt-br/web/javascript/reference/global_objects/math/sin/index.html @@ -0,0 +1,92 @@ +--- +title: Math.sin() +slug: Web/JavaScript/Reference/Global_Objects/Math/sin +translation_of: Web/JavaScript/Reference/Global_Objects/Math/sin +--- +
{{JSRef}}
+ +

A função Math.sin() retorna o seno de um número.

+ +
{{EmbedInteractiveExample("pages/js/math-sin.html")}}
+ + + +

Sintaxe

+ +
Math.sin(x)
+ +

Paramêtros

+ +
+
x
+
Um número (dado em radianos)
+
+ +

Valor retornado

+ +

O seno de um número dado.

+ +

Descrição

+ +

O método Math.sin() retorna um valor numérico entre -1 e 1, que representa o seno de um angulo dado em radianos.

+ +

Como sin() é um método estático de Math, você sempre o usa como Math.sin(), ao invés de um método de um objeto Math que você criou (Math não é um construtor).

+ +

Exemplos

+ +

Usando Math.sin()

+ +
Math.sin(0);           // 0
+Math.sin(1);           // 0.8414709848078965
+
+Math.sin(Math.PI / 2); // 1
+
+ +

Especificações

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
SpecificationStatusComment
{{SpecName('ES1')}}{{Spec2('ES1')}}Definição inicial. Implementado no JavaScript 1.0.
{{SpecName('ES5.1', '#sec-15.8.2.16', 'Math.sin')}}{{Spec2('ES5.1')}} 
{{SpecName('ES6', '#sec-math.sin', 'Math.sin')}}{{Spec2('ES6')}} 
{{SpecName('ESDraft', '#sec-math.sin', 'Math.sin')}}{{Spec2('ESDraft')}} 
+ +

Browser compatibility

+ + + +

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

+ +

Veja também

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