Math.LN2
The Math.LN2
property represents the natural logarithm of 2, approximately 0.693:
Math.LN2
속성은 2의 자연로그 값, 약 0.693의 값을 가집니다.
시도해보기
Property attributes of Math.LN2 |
|
---|---|
Writable | 불가능 |
Enumerable | 불가능 |
Configurable | 불가능 |
설명
LN2
는 Math
의 정적 속성이므로, 사용자가 생성한 Math
객체의 속성으로 접근할 수 없고 항상 Math.LN2
를 사용해야 합니다. (Math
는 생성자가 아닙니다)
Examples
Math.LN2
사용하기
다음 함수는 2의 자연 로그 값을 반환합니다.
function getNatLog2() {
return Math.LN2;
}
getNatLog2(); // 0.6931471805599453
명세
Specification |
---|
ECMAScript Language Specification # sec-math.ln2 |
브라우저 호환성
BCD tables only load in the browser