Math.SQRT2
는 2의 제곱근을 나타내고 약 1.414 입니다:
Property attributes of Math.SQRT2 |
|
---|---|
Writable | no |
Enumerable | no |
Configurable | no |
설명
SQRT2
는 Math
의 정적 메서드 이므로 만든 Math
객체의 메서드가 아니라 항상 Math.SQRT2
함수를 사용해야합니다. (Math
는 생성자가 없습니다.)
예제
Math.SQRT2
이 함수는 2의 제곱근을 반환합니다.
function getRoot2() {
return Math.SQRT2;
}
getRoot2(); // 1.4142135623730951
표준
표준 | 상태 | 비고 |
---|---|---|
ECMAScript 1st Edition (ECMA-262) | Standard | Initial definition. Implemented in JavaScript 1.0. |
ECMAScript 5.1 (ECMA-262) The definition of 'Math.SQRT2' in that specification. |
Standard | |
ECMAScript 2015 (6th Edition, ECMA-262) The definition of 'Math.SQRT2' in that specification. |
Standard | |
ECMAScript (ECMA-262) The definition of 'Math.SQRT2' in that specification. |
Living Standard |
브라우저 호환성
BCD tables only load in the browser
The compatibility table in 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.