blob: 63adf3ab3aeb65faa581322089a13a8862626f87 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
|
---
title: Math.SQRT1_2
slug: Web/JavaScript/Reference/Global_Objects/Math/SQRT1_2
translation_of: Web/JavaScript/Reference/Global_Objects/Math/SQRT1_2
---
<div>{{JSRef}}</div>
<p><strong><code>Math.SQRT1_2</code></strong> 프로퍼티는 약 0.707의 값을 나타내는 루트 1/2을 나타냅니다:</p>
<p><math display="block"><semantics><mrow><mstyle mathvariant="monospace"><mi>Math.SQRT1_2</mi></mstyle><mo>=</mo><msqrt><mfrac><mn>1</mn><mn>2</mn></mfrac></msqrt><mo>=</mo><mfrac><mn>1</mn><msqrt><mn>2</mn></msqrt></mfrac><mo>≈</mo><mn>0.707</mn></mrow><annotation encoding="TeX">\mathtt{\mi{Math.SQRT1_2}} = \sqrt{\frac{1}{2}} = \frac{1}{\sqrt{2}} \approx 0.707</annotation></semantics></math></p>
<div>{{EmbedInteractiveExample("pages/js/math-sqrt1_2.html", "shorter")}}</div>
<div>{{js_property_attributes(0, 0, 0)}}</div>
<h2 id="설명">설명</h2>
<p><code>SQRT1_2</code> 는 <code>Math</code>의 정적 프로퍼티이기 때문에, 당신이 생성한 <code>Math</code> 오브젝트의 프로퍼티보다는 항상 <code>Math.SQRT1_2</code>의 형태로 사용합니다 (<code>Math</code>는 컨스트럭터가 아닙니다).</p>
<h2 id="예시">예시</h2>
<h3 id="Math.SQRT1_2_의_사용"><code>Math.SQRT1_2</code> 의 사용</h3>
<p>다음은 루트 1/2를 출력합니다:</p>
<pre class="brush:js">function getRoot1_2() {
return Math.SQRT1_2;
}
getRoot1_2(); // 0.7071067811865476
</pre>
<h2 id="사양">사양</h2>
<table class="standard-table">
<tbody>
<tr>
<th scope="col">사양</th>
</tr>
<tr>
<td>{{SpecName('ESDraft', '#sec-math.sqrt1_2', 'Math.SQRT1_2')}}</td>
</tr>
</tbody>
</table>
<h2 id="브라우저_호환성">브라우저 호환성</h2>
<p>{{Compat("javascript.builtins.Math.SQRT1_2")}}</p>
<h2 id="같이_보기">같이 보기</h2>
<ul>
<li>{{jsxref("Math.pow()")}}</li>
<li>{{jsxref("Math.sqrt()")}}</li>
</ul>
|