-
Notifications
You must be signed in to change notification settings - Fork 8.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
updated the Math.sin() method doc #23584
Conversation
page-type: javascript-static-method | ||
browser-compat: javascript.builtins.Math.sin |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[mdn-linter] reported by reviewdog 🐶
page-type: javascript-static-method | |
browser-compat: javascript.builtins.Math.sin |
Preview URLs (comment last updated: 2024-09-18 03:17:40) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
存在一些问题
## 概述 | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
## 概述 |
@@ -7,11 +7,13 @@ slug: Web/JavaScript/Reference/Global_Objects/Math/sin | |||
|
|||
## 概述 | |||
|
|||
**`Math.sin()`** 函数返回一个数值的正弦值。 | |||
**`Math.sin()`** 静态方法返回一个弧度的正弦值。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
**`Math.sin()`** 静态方法返回一个弧度的正弦值。 | |
**`Math.sin()`** 静态方法以弧度为单位返回一个数字的正弦值。 |
@@ -22,19 +24,21 @@ Math.sin(x) | |||
|
|||
## 描述 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
## 描述 | |
### 返回值 |
|
||
由于 `sin` 是 `Math` 的静态方法,所以应该像这样使用:`Math.sin()`,而不是作为你创建的 `Math` 实例的方法。 | ||
由于 `sin` 是 `Math` 的静态方法,所以应该像这样使用:`Math.sin()`,而不是作为你创建的 `Math` 实例的方法(`Math` 不是构造函数)。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
由于 `sin` 是 `Math` 的静态方法,所以应该像这样使用:`Math.sin()`,而不是作为你创建的 `Math` 实例的方法(`Math` 不是构造函数)。 | |
由于 `sin()` 是 `Math` 的静态方法,应该总是以 `Math.sin()` 的形式,而不是作为 `Math` 对象的方法来使用它(`Math` 不是构造函数)。 |
|
||
由于 `sin` 是 `Math` 的静态方法,所以应该像这样使用:`Math.sin()`,而不是作为你创建的 `Math` 实例的方法。 | ||
由于 `sin` 是 `Math` 的静态方法,所以应该像这样使用:`Math.sin()`,而不是作为你创建的 `Math` 实例的方法(`Math` 不是构造函数)。 | ||
|
||
## 示例 | ||
|
||
### 示例:使用 `Math.sin` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
### 示例:使用 `Math.sin` | |
### 使用 Math.sin() |
## 描述 | ||
## 返回值 | ||
|
||
`x` 的正弦值,介于 -1 到 1 之间(包含 -1 和 1)。如果 `x` 为 {{jsxref("Infinity")}}、`-Infinity` 或 {{jsxref("NaN")}},则返回 {{jsxref("NaN")}}。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
`x` 的正弦值,介于 -1 到 1 之间(包含 -1 和 1)。如果 `x` 为 {{jsxref("Infinity")}}、`-Infinity` 或 {{jsxref("NaN")}},则返回 {{jsxref("NaN")}}。 | |
`x` 的正弦值,介于 -1 到 1 之间(包含 -1 和 1)。如果 `x` 为 {{jsxref("Infinity")}}、`-Infinity` 或 {{jsxref("NaN")}},则返回 {{jsxref("NaN")}}。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 感谢
Co-authored-by: Jason Ren <[email protected]>
Description
updated the Math.sin() method doc.
Motivation
to update the doc and keep the doc up-to-date.
Additional details
Related issues and pull requests