From 2d639081eaffa2153c5a8849b7b6bc647901ea75 Mon Sep 17 00:00:00 2001 From: an-777 <121708493+Dr-XYZ@users.noreply.github.com> Date: Thu, 12 Dec 2024 19:22:34 +0800 Subject: [PATCH 1/3] create --- .../global_objects/math/log2e/index.md | 52 +++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 files/zh-tw/web/javascript/reference/global_objects/math/log2e/index.md diff --git a/files/zh-tw/web/javascript/reference/global_objects/math/log2e/index.md b/files/zh-tw/web/javascript/reference/global_objects/math/log2e/index.md new file mode 100644 index 00000000000000..5ac98fed5f2a68 --- /dev/null +++ b/files/zh-tw/web/javascript/reference/global_objects/math/log2e/index.md @@ -0,0 +1,52 @@ +--- +title: Math.LOG2E +slug: Web/JavaScript/Reference/Global_Objects/Math/LOG2E +--- + +{{JSRef}} + +**`Math.LOG2E`** 是靜態數據屬性,表示 [e](/zh-TW/docs/Web/JavaScript/Reference/Global_Objects/Math/E) 以 2 為底的對數值,約為 1.443。 + +{{EmbedInteractiveExample("pages/js/math-log2e.html", "shorter")}} + +## 值 + + + + 𝙼𝚊𝚝𝚑.𝙻𝙾𝙶𝟸𝙴=log2(e)1.443\mathtt{Math.LOG2E} = \log_2(\mathrm{e}) \approx 1.443 + + + +{{js_property_attributes(0, 0, 0)}} + +## 描述 + +由於 `LOG2E` 是 `Math` 的靜態屬性,因此你應始終以 `Math.LOG2E` 的方式使用,而非作為某個 `Math` 物件的屬性(`Math` 並不是建構函式)。 + +## 範例 + +### 使用 Math.LOG2E + +以下函式返回 e 以 2 為底的對數值: + +```js +function getLog2e() { + return Math.LOG2E; +} + +getLog2e(); // 1.4426950408889634 +``` + +## 規範 + +{{Specifications}} + +## 瀏覽器相容性 + +{{Compat}} + +## 參見 + +- {{jsxref("Math.exp()")}} +- {{jsxref("Math.log()")}} +- {{jsxref("Math.log2()")}} From 6ef385e1101565fbfd41416f5bcbb7a733cdddbf Mon Sep 17 00:00:00 2001 From: an-777 <121708493+Dr-XYZ@users.noreply.github.com> Date: Thu, 12 Dec 2024 19:23:56 +0800 Subject: [PATCH 2/3] fix --- .../web/javascript/reference/global_objects/math/log2e/index.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/files/zh-tw/web/javascript/reference/global_objects/math/log2e/index.md b/files/zh-tw/web/javascript/reference/global_objects/math/log2e/index.md index 5ac98fed5f2a68..46b378e8be7510 100644 --- a/files/zh-tw/web/javascript/reference/global_objects/math/log2e/index.md +++ b/files/zh-tw/web/javascript/reference/global_objects/math/log2e/index.md @@ -1,6 +1,8 @@ --- title: Math.LOG2E slug: Web/JavaScript/Reference/Global_Objects/Math/LOG2E +l10n: + sourceCommit: 2ec170b6264d51a15be498ac99b8a30b3dadec15 --- {{JSRef}} From d3403db1b0fa0c2a4d223e40e99fe6a30918a52e Mon Sep 17 00:00:00 2001 From: an-777 <121708493+Dr-XYZ@users.noreply.github.com> Date: Wed, 18 Dec 2024 19:49:23 +0800 Subject: [PATCH 3/3] fix --- .../javascript/reference/global_objects/math/log2e/index.md | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/files/zh-tw/web/javascript/reference/global_objects/math/log2e/index.md b/files/zh-tw/web/javascript/reference/global_objects/math/log2e/index.md index 46b378e8be7510..b76c6b5547107a 100644 --- a/files/zh-tw/web/javascript/reference/global_objects/math/log2e/index.md +++ b/files/zh-tw/web/javascript/reference/global_objects/math/log2e/index.md @@ -7,23 +7,21 @@ l10n: {{JSRef}} -**`Math.LOG2E`** 是靜態數據屬性,表示 [e](/zh-TW/docs/Web/JavaScript/Reference/Global_Objects/Math/E) 以 2 為底的對數值,約為 1.443。 +**`Math.LOG2E`** 靜態數據屬性表示 [e](/zh-TW/docs/Web/JavaScript/Reference/Global_Objects/Math/E) 以 2 為底的對數值,約為 1.443。 {{EmbedInteractiveExample("pages/js/math-log2e.html", "shorter")}} ## 值 - 𝙼𝚊𝚝𝚑.𝙻𝙾𝙶𝟸𝙴=log2(e)1.443\mathtt{Math.LOG2E} = \log_2(\mathrm{e}) \approx 1.443 - {{js_property_attributes(0, 0, 0)}} ## 描述 -由於 `LOG2E` 是 `Math` 的靜態屬性,因此你應始終以 `Math.LOG2E` 的方式使用,而非作為某個 `Math` 物件的屬性(`Math` 並不是建構函式)。 +由於 `LOG2E` 是 `Math` 的靜態屬性,因此你應始終以 `Math.LOG2E` 的方式使用,而非作為某個 `Math` 物件的屬性(`Math` 並不是建構子)。 ## 範例