From e2879be3badf2072dcbecf6724a195da51eaf092 Mon Sep 17 00:00:00 2001 From: an-777 <121708493+Dr-XYZ@users.noreply.github.com> Date: Tue, 17 Dec 2024 19:26:53 +0800 Subject: [PATCH 1/4] temp --- .../reference/global_objects/math/acosh/e.md | 65 +++++++++++++++++++ .../global_objects/math/acosh/index.md | 0 2 files changed, 65 insertions(+) create mode 100644 files/zh-tw/web/javascript/reference/global_objects/math/acosh/e.md create mode 100644 files/zh-tw/web/javascript/reference/global_objects/math/acosh/index.md diff --git a/files/zh-tw/web/javascript/reference/global_objects/math/acosh/e.md b/files/zh-tw/web/javascript/reference/global_objects/math/acosh/e.md new file mode 100644 index 00000000000000..8415bee330d76f --- /dev/null +++ b/files/zh-tw/web/javascript/reference/global_objects/math/acosh/e.md @@ -0,0 +1,65 @@ +--- +title: Math.acosh() +slug: Web/JavaScript/Reference/Global_Objects/Math/acosh +page-type: javascript-static-method +browser-compat: javascript.builtins.Math.acosh +--- + +{{JSRef}} + +The **`Math.acosh()`** static method returns the inverse hyperbolic cosine of a number. That is, + + + + x1,𝙼𝚊𝚝𝚑.𝚊𝚌𝚘𝚜𝚑(𝚡)=arcosh(x)=the unique y0 such that cosh(y)=x=ln(x+x21)\begin{aligned}\forall x \geq 1,\;\mathtt{\operatorname{Math.acosh}(x)} &= \operatorname{arcosh}(x) = \text{the unique } y \geq 0 \text{ such that } \cosh(y) = x\\&= \ln\left(x + \sqrt{x^2 - 1}\right)\end{aligned} + + + +{{EmbedInteractiveExample("pages/js/math-acosh.html")}} + +## Syntax + +```js-nolint +Math.acosh(x) +``` + +### Parameters + +- `x` + - : A number greater than or equal to 1. + +### Return value + +The inverse hyperbolic cosine of `x`. If `x` is less than 1, returns {{jsxref("NaN")}}. + +## Description + +Because `acosh()` is a static method of `Math`, you always use it as `Math.acosh()`, rather than as a method of a `Math` object you created (`Math` is no constructor). + +## Examples + +### Using Math.acosh() + +```js +Math.acosh(0); // NaN +Math.acosh(1); // 0 +Math.acosh(2); // 1.3169578969248166 +Math.acosh(Infinity); // Infinity +``` + +## Specifications + +{{Specifications}} + +## Browser compatibility + +{{Compat}} + +## See also + +- [Polyfill of `Math.acosh` in `core-js`](https://github.com/zloirock/core-js#ecmascript-math) +- {{jsxref("Math.asinh()")}} +- {{jsxref("Math.atanh()")}} +- {{jsxref("Math.cosh()")}} +- {{jsxref("Math.sinh()")}} +- {{jsxref("Math.tanh()")}} \ No newline at end of file diff --git a/files/zh-tw/web/javascript/reference/global_objects/math/acosh/index.md b/files/zh-tw/web/javascript/reference/global_objects/math/acosh/index.md new file mode 100644 index 00000000000000..e69de29bb2d1d6 From 04d1e6b623b869192792e3aab0804ce3f4091623 Mon Sep 17 00:00:00 2001 From: an-777 <121708493+Dr-XYZ@users.noreply.github.com> Date: Tue, 17 Dec 2024 19:37:58 +0800 Subject: [PATCH 2/4] create --- .../reference/global_objects/math/acosh/e.md | 65 ------------------- .../global_objects/math/acosh/index.md | 63 ++++++++++++++++++ 2 files changed, 63 insertions(+), 65 deletions(-) delete mode 100644 files/zh-tw/web/javascript/reference/global_objects/math/acosh/e.md diff --git a/files/zh-tw/web/javascript/reference/global_objects/math/acosh/e.md b/files/zh-tw/web/javascript/reference/global_objects/math/acosh/e.md deleted file mode 100644 index 8415bee330d76f..00000000000000 --- a/files/zh-tw/web/javascript/reference/global_objects/math/acosh/e.md +++ /dev/null @@ -1,65 +0,0 @@ ---- -title: Math.acosh() -slug: Web/JavaScript/Reference/Global_Objects/Math/acosh -page-type: javascript-static-method -browser-compat: javascript.builtins.Math.acosh ---- - -{{JSRef}} - -The **`Math.acosh()`** static method returns the inverse hyperbolic cosine of a number. That is, - - - - x1,𝙼𝚊𝚝𝚑.𝚊𝚌𝚘𝚜𝚑(𝚡)=arcosh(x)=the unique y0 such that cosh(y)=x=ln(x+x21)\begin{aligned}\forall x \geq 1,\;\mathtt{\operatorname{Math.acosh}(x)} &= \operatorname{arcosh}(x) = \text{the unique } y \geq 0 \text{ such that } \cosh(y) = x\\&= \ln\left(x + \sqrt{x^2 - 1}\right)\end{aligned} - - - -{{EmbedInteractiveExample("pages/js/math-acosh.html")}} - -## Syntax - -```js-nolint -Math.acosh(x) -``` - -### Parameters - -- `x` - - : A number greater than or equal to 1. - -### Return value - -The inverse hyperbolic cosine of `x`. If `x` is less than 1, returns {{jsxref("NaN")}}. - -## Description - -Because `acosh()` is a static method of `Math`, you always use it as `Math.acosh()`, rather than as a method of a `Math` object you created (`Math` is no constructor). - -## Examples - -### Using Math.acosh() - -```js -Math.acosh(0); // NaN -Math.acosh(1); // 0 -Math.acosh(2); // 1.3169578969248166 -Math.acosh(Infinity); // Infinity -``` - -## Specifications - -{{Specifications}} - -## Browser compatibility - -{{Compat}} - -## See also - -- [Polyfill of `Math.acosh` in `core-js`](https://github.com/zloirock/core-js#ecmascript-math) -- {{jsxref("Math.asinh()")}} -- {{jsxref("Math.atanh()")}} -- {{jsxref("Math.cosh()")}} -- {{jsxref("Math.sinh()")}} -- {{jsxref("Math.tanh()")}} \ No newline at end of file diff --git a/files/zh-tw/web/javascript/reference/global_objects/math/acosh/index.md b/files/zh-tw/web/javascript/reference/global_objects/math/acosh/index.md index e69de29bb2d1d6..d91f221ad03024 100644 --- a/files/zh-tw/web/javascript/reference/global_objects/math/acosh/index.md +++ b/files/zh-tw/web/javascript/reference/global_objects/math/acosh/index.md @@ -0,0 +1,63 @@ +--- +title: Math.acosh() +slug: Web/JavaScript/Reference/Global_Objects/Math/acosh +l10n: + sourceCommit: 761b9047d78876cbd153be811efb1aa77b419877 +--- + +{{JSRef}} + +**`Math.acosh()`** 靜態方法回傳數字的反雙曲餘弦值。也就是說, + + + x1,𝙼𝚊𝚝𝚑.𝚊𝚌𝚘𝚜𝚑(𝚡)=arcosh(x)=the unique y0 such that cosh(y)=x=ln(x+x21)\begin{aligned}\forall x \geq 1,\;\mathtt{\operatorname{Math.acosh}(x)} &= \operatorname{arcosh}(x) = \text{the unique } y \geq 0 \text{ such that } \cosh(y) = x\\&= \ln\left(x + \sqrt{x^2 - 1}\right)\end{aligned} + + +{{EmbedInteractiveExample("pages/js/math-acosh.html")}} + +## 語法 + +```js-nolint +Math.acosh(x) +``` + +### 參數 + +- `x` + - : 一個大於或等於 1 的數字。 + +### 回傳值 + +`x` 的反雙曲餘弦值。如果 `x` 小於 1,則回傳 {{jsxref("NaN")}}。 + +## 描述 + +由於 `acosh()` 是 `Math` 的靜態方法,你必須使用 `Math.acosh()` 來呼叫它,而非呼叫你建立的 `Math` 物件的方法(`Math` 並非建構函式)。 + +## 範例 + +### 使用 Math.acosh() + +```js +Math.acosh(0); // NaN +Math.acosh(1); // 0 +Math.acosh(2); // 1.3169578969248166 +Math.acosh(Infinity); // Infinity +``` + +## 規範 + +{{Specifications}} + +## 瀏覽器相容性 + +{{Compat}} + +## 參見 + +- [在 `core-js` 中的 `Math.acosh` polyfill](https://github.com/zloirock/core-js#ecmascript-math) +- {{jsxref("Math.asinh()")}} +- {{jsxref("Math.atanh()")}} +- {{jsxref("Math.cosh()")}} +- {{jsxref("Math.sinh()")}} +- {{jsxref("Math.tanh()")}} From 70d6fe4444163c857f8060deb47679b32955dcd6 Mon Sep 17 00:00:00 2001 From: an-777 <121708493+Dr-XYZ@users.noreply.github.com> Date: Thu, 19 Dec 2024 17:20:42 +0800 Subject: [PATCH 3/4] fix --- .../web/javascript/reference/global_objects/math/acosh/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/zh-tw/web/javascript/reference/global_objects/math/acosh/index.md b/files/zh-tw/web/javascript/reference/global_objects/math/acosh/index.md index d91f221ad03024..7a117c21bf15d5 100644 --- a/files/zh-tw/web/javascript/reference/global_objects/math/acosh/index.md +++ b/files/zh-tw/web/javascript/reference/global_objects/math/acosh/index.md @@ -32,7 +32,7 @@ Math.acosh(x) ## 描述 -由於 `acosh()` 是 `Math` 的靜態方法,你必須使用 `Math.acosh()` 來呼叫它,而非呼叫你建立的 `Math` 物件的方法(`Math` 並非建構函式)。 +由於 `acosh()` 是 `Math` 的靜態方法,你必須使用 `Math.acosh()` 來呼叫它,而非呼叫你建立的 `Math` 物件的方法(`Math` 並非建構子)。 ## 範例 From 2d947fc35f2c167a7dccef81546e0990172e16d1 Mon Sep 17 00:00:00 2001 From: "Dr.XYZ" <121708493+Dr-XYZ@users.noreply.github.com> Date: Thu, 19 Dec 2024 21:20:28 +0800 Subject: [PATCH 4/4] Apply suggestions from code review Co-authored-by: A1lo --- .../web/javascript/reference/global_objects/math/acosh/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/zh-tw/web/javascript/reference/global_objects/math/acosh/index.md b/files/zh-tw/web/javascript/reference/global_objects/math/acosh/index.md index 7a117c21bf15d5..760e636df137c8 100644 --- a/files/zh-tw/web/javascript/reference/global_objects/math/acosh/index.md +++ b/files/zh-tw/web/javascript/reference/global_objects/math/acosh/index.md @@ -55,7 +55,7 @@ Math.acosh(Infinity); // Infinity ## 參見 -- [在 `core-js` 中的 `Math.acosh` polyfill](https://github.com/zloirock/core-js#ecmascript-math) +- [`core-js` 中 `Math.acosh` 的 polyfill](https://github.com/zloirock/core-js#ecmascript-math) - {{jsxref("Math.asinh()")}} - {{jsxref("Math.atanh()")}} - {{jsxref("Math.cosh()")}}