-
Notifications
You must be signed in to change notification settings - Fork 22.5k
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
Clarify Math.abs return value description #35684
Conversation
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 changes its meaning. Math.abs(-0)
returns 0
, not -0
. -0
and 0
are two distinct values.
This PR basically just removes a sentence. Why does the extra sentence make this less clear? |
Because when people read it, it sounds like |
I don't understand how that conclusion can be reached from "If
Nope, from a mathematical view, |
files/en-us/web/javascript/reference/global_objects/math/abs/index.md
Outdated
Show resolved
Hide resolved
…ndex.md Co-authored-by: Joshua Chen <[email protected]>
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.
Thanks 👍
Description
The Math.abs return value description isn't clear, and there was already a previous issue open because of it (#21526).
Motivation
To describe the actual returning value in a more clear way.
Although the explanation in #21526 is correct, the way it's described is not clear at all. So I hope with this PR it can bring some clarity to the matter.
Additional details
Related issues and pull requests
Relates to #21526