Math.sin()
Baseline Widely available
This feature is well established and works across many devices and browser versions. It’s been available across browsers since July 2015.
Resumen
La función Math.sin()
devuelve el seno de un número.
Sintaxis
Math.sin(x)
Parámetros
x
-
Un número (en radianes).
Descripción
El método Math.sin()
devuelve un valor numérico entre -1 y 1, que representa el seno del ángulo dado en radianes.
Debido a que sin()
es un método estático de Math
, siempre se usa como Math.sin()
, en vez de crear un objeto Math
y usarlo como un método (Math
no es un constructor).
Ejemplos
Ejemplo: Usando Math.sin()
js
Math.sin(0); // 0
Math.sin(1); // 0.8414709848078965
Math.sin(Math.PI / 2); // 1
Especificaciones
Specification |
---|
ECMAScript® 2025 Language Specification # sec-math.sin |
Compatibilidad con navegadores
Report problems with this compatibility data on GitHubdesktop | mobile | server | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
sin |
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.