-
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
Fix ellipse angles definition #24816
Conversation
As was found in whatwg/html#8408 the ellipse's `startAngle` and `endAngle` are not really angles on the ellipse, but angles on the eccentric circle of the ellipse. These are known as "eccentric angle", though this term *might* be a bit obscure at first sight, so I wouldn't mind a better proposition if reviewers have one. The specs got fixed in whatwg/html#8495 but as can be seen, the fix was quite verbose and I'm not sure the docs need to get that much details. So I hope this little fix is both enough to lead the ones that could get surprised by the actual behavior to the proper understanding, and not too obscure to lose in details the ones that wouldn't notice.
Preview URLs External URLs (1)URL:
(comment last updated: 2023-02-24 07:56:30) |
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.
Let's link to a good explanation (on an outside website). That way, people who don't know what it is are one click away from a good explanation.
This is a really good catch, and I learned some math stuff today (and I am giving maths lessons) |
Co-authored-by: Jean-Yves Perrier <jypenator@gmail.com>
Co-authored-by: Jean-Yves Perrier <jypenator@gmail.com>
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.
👍
Description
This fixes a the Canvas2D
ellipse()
methods angles definition.As was found in whatwg/html#8408 the ellipse's
startAngle
andendAngle
are not really angles on the ellipse, but angles on the eccentric circle of the ellipse.These are known as "eccentric angle" (e.g on Wolfram) , though this term might be a bit obscure at first sight, so I wouldn't mind a better proposition if reviewers have one.
Motivation
A couple of questions were opened on StackOverflow over this discrepancy between specs+docs vs implementations. (https://stackoverflow.com/questions/74111375, https://stackoverflow.com/questions/52149077)
Additional details
The specs got fixed in whatwg/html#8495 but as can be seen, the fix was quite verbose and I'm not sure the docs need to get into that much details. So I hope this little fix is both enough to lead the ones that could get surprised by the actual behavior to the proper understanding, and not too obscure to lose in details the ones that wouldn't notice.
Related issues and pull requests
‐