Movatterモバイル変換


[0]ホーム

URL:


  1. 개발자를 위한 웹 기술
  2. JavaScript
  3. JavaScript 참고서
  4. 표준 내장 객체
  5. Math
  6. Math.SQRT1_2

This page was translated from English by the community.Learn more and join the MDN Web Docs community.

View in EnglishAlways switch to English

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 2015년 7월.

Math.SQRT1_2 정적 데이터 속성은 약 0.707의 값을 나타내는 제곱근 1/2을 나타냅니다

시도해 보기

function getRoot1Over2() {  return Math.SQRT1_2;}console.log(getRoot1Over2());// Expected output: 0.7071067811865476

𝙼𝚊𝚝𝚑.𝚂𝚀𝚁𝚃𝟷_𝟸=120.707\mathtt{Math.SQRT1_2} = \sqrt{\frac{1}{2}} \approx 0.707
Property attributes ofMath.SQRT1_2
쓰기 가능불가능
열거 가능불가능
설정 가능불가능

설명

Math.SQRT1_2는 상수이며Math.sqrt(0.5)과 동일하지만 성능이 더 좋습니다.

SQRT1_2Math의 정적 속성이기 때문에 생성한Math객체(Math는 생성자가 아닙니다)의 속성으로 사용하는 것보다Math.SQRT1_2로 사용해야 합니다.

예제

Math.SQRT1_2 사용하기

아래 함수는 1 / 2의 제곱근을 반환합니다.

js
function getRoot1_2() {  return Math.SQRT1_2;}getRoot1_2(); // 0.7071067811865476

명세서

Specification
ECMAScript® 2026 Language Specification
# sec-math.sqrt1_2

브라우저 호환성

같이 보기

Help improve MDN

Learn how to contribute

This page was last modified on byMDN contributors.


[8]ページ先頭

©2009-2026 Movatter.jp