Math.SQRT1_2
프로퍼티는 약 0.707의 값을 나타내는 루트 1/2을 나타냅니다:
The source for this interactive example is stored in a GitHub repository. If you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
이 상호적인 예시의 소스는 깃헙에 저장되어 있습니다. 만약 상호적인 예시 프로젝트에 기여하고 싶으시다면, https://github.com/mdn/interactive-examples를 클론한 후, 풀 리퀘스트를 보내주시기 바랍니다.
Property attributes of Math.SQRT1_2 |
|
---|---|
Writable | no |
Enumerable | no |
Configurable | no |
설명
SQRT1_2
는 Math
의 정적 프로퍼티이기 때문에, 당신이 생성한 Math
오브젝트의 프로퍼티보다는 항상 Math.SQRT1_2
의 형태로 사용합니다 (Math
는 컨스트럭터가 아닙니다).
예시
Math.SQRT1_2
의 사용
다음은 루트 1/2를 출력합니다:
function getRoot1_2() {
return Math.SQRT1_2;
}
getRoot1_2(); // 0.7071067811865476
사양
브라우저 호환성
BCD tables only load in the browser
이 페이지의 호환성 표는 구조화된 데이터에서 생성됩니다. 데이터에 기여하고 싶으시다면, https://github.com/mdn/browser-compat-data을 확인하고 풀 리퀘스트를 보내 주시기 바랍니다.