-
Notifications
You must be signed in to change notification settings - Fork 23.1k
fix(css): clarify angle return wording for atan, asin, acos #42426
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
Conversation
Corrects an incorrect calculation in the documentation warning.
| --- | ||
|
|
||
| The **`asin()`** [CSS](/en-US/docs/Web/CSS) [function](/en-US/docs/Web/CSS/Reference/Values/Functions) is a trigonometric function that returns the inverse sine of a number between `-1` and `1`. The function contains a single calculation that returns the number of radians representing an {{cssxref("<angle>")}} between `-90deg` and `90deg`. | ||
| The **`asin()`** [CSS](/en-US/docs/Web/CSS) [function](/en-US/docs/Web/CSS/Reference/Values/Functions) is a trigonometric function that returns the inverse sine of a number between `-1` and `1`. The function contains a single calculation that returns an {{cssxref("<angle>")}} between `-90deg` and `90deg`. |
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.
[markdownlint] reported by reviewdog 🐶
error MD033/no-inline-html Inline HTML [Element: angle]
| --- | ||
|
|
||
| The **`atan()`** [CSS](/en-US/docs/Web/CSS) [function](/en-US/docs/Web/CSS/Reference/Values/Functions) is a trigonometric function that returns the inverse tangent of a number between `-∞` and `+∞`. The function contains a single calculation that returns the number of radians representing an {{cssxref("<angle>")}} between `-90deg` and `90deg`. | ||
| The **`atan()`** [CSS](/en-US/docs/Web/CSS) [function](/en-US/docs/Web/CSS/Reference/Values/Functions) is a trigonometric function that returns the inverse tangent of a number between `-∞` and `+∞`. The function contains a single calculation that returns an {{cssxref("<angle>")}} between `-90deg` and `90deg`. |
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.
[markdownlint] reported by reviewdog 🐶
error MD033/no-inline-html Inline HTML [Element: angle]
|
Preview URLs
Flaws (69)Note! 1 document with no flaws that don't need to be listed. 🎉 URL:
URL:
URL:
(comment last updated: 2025-12-16 14:39:46) |
|
Hi! This PR clarifies the return value wording for atan(), asin(), and acos() |
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
chrisdavidmills
left a comment
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.
Hi @kashish2710, and thank you for your work on this. The updated wording makes more sense. I just had one comment on an unrelated change that seems to have slipped in.
| > The spec doesn't specify the overflowing behavior, so browsers have divergent behaviors. When overflowing, the value would either wrap around to 0, to a negative value, or fail with an error. | ||
| > Unless overflow throws, request IDs are also not truly unique because there are only finitely many 32-bit integers for possibly infinitely many callbacks. | ||
| > Note, however, that it would take ~500 days to reach the issue when rendering at 60Hz with 100 calls to `requestAnimationFrame()` per frame. | ||
| > Note, however, that it would take approximately 800 days to reach the issue when rendering at 60Hz with a single call to requestAnimationFrame() per frame. |
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.
This isn't related to the rest of the PR. Did it get added by mistake? If it is still valid, can you remove it from here and then submit it as a separate PR? Thanks.
|
This pull request has merge conflicts that must be resolved before it can be merged. |
| > Note, however, that it would take ~500 days to reach the issue when rendering at 60Hz with 100 calls to `requestAnimationFrame()` per frame. | ||
| > Note, however, that it would take ~500 days to reach the issue when rendering at 60Hz with 100 calls to requestAnimationFrame() per frame. | ||
|
|
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 🐶
|
Thanks for the review! The unrelated requestAnimationFrame change has now been reverted from this PR, and the conflict is resolved. Appreciate your guidance. |
chrisdavidmills
left a comment
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.
LGTM; thanks again, @kashish2710.
Clarifies the return value wording for CSS trigonometric functions atan(), asin(), and acos()
by removing references to "number of radians" and consistently describing the result
as an
<angle>, aligning with existing guidance.