Math.SQRT1_2
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.
A propriedade Math.SQRT1_2
representa a raiz quadrada de , que é aproximadamente 0.707:
Property attributes of Math.SQRT1_2 | |
---|---|
Writable | no |
Enumerable | no |
Configurable | no |
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:
js
function getRoot1_2() {
return Math.SQRT1_2;
}
getRoot1_2(); // 0.7071067811865476
Especificações
Specification |
---|
ECMAScript® 2025 Language Specification # sec-math.sqrt1_2 |
Compatibilidade com navegadores
Report problems with this compatibility data on GitHubdesktop | mobile | server | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
SQRT1_2 |
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.