Skip to content

Fix Comments for PreciseArcTo() - #22402

Merged
MrJul merged 4 commits into
AvaloniaUI:mainfrom
robloo:robloo/precisearcto-comments-fix
Oct 8, 2026
Merged

MrJul merged 4 commits into
AvaloniaUI:mainfrom
robloo:robloo/precisearcto-comments-fix

Conversation

@robloo

@robloo robloo commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

What does the pull request do?

Fixes the comments in PreciseArcTo() which incorrectly define the input rotationAngle units as radians isntead of degrees.

This matches the discussions here:

What is the current behavior?

Comments list radians instead of degrees.

What is the updated/expected behavior with this PR?

Comments are updated to mention degrees (which is being used already in the math). Comments were updated by inheriting existing text where possible.

How was the solution implemented (if it's not obvious)?

Checklist

Breaking changes

None. Access modifiers were made explicitly internal in the static PreciseEllipticArcHelper helper but this isn't a change. Within that helper, EllipticalArc was restricted to private but that isn't an issue since it was within the internal helper.

Obsoletions / Deprecations

None

Fixed issues

Related to #21445

@github-actions

github-actions Bot commented Oct 7, 2026 •

Copy link
Copy Markdown

NuGet packages

The packages for this pull request have been published (workflow run):

@MrJul MrJul added enhancement area-documentation backport-candidate-12.1.x Consider this PR for backporting to 12.1 branch labels Oct 8, 2026

@MrJul MrJul left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While I usually don't mind some unneeded spaces being automatically removed, in this PR, the code reformatting makes up the majority of the changes. Please revert that.

(We'll have some proper solution-wide reformatting and style enforcement at some point.)

@robloo

robloo commented Oct 8, 2026

Copy link
Copy Markdown
Contributor Author

@MrJul The code reformatting here actually fixes wrong indentation which affects readability quite a bit when going through that particular code. I couldn't at-a-glance tell the nesting when I was adjusting access modifiers. I restrained myself quite a bit as far as formatting corrections go. Whether the format change is larger than the code change is largely irrelevant as long as they are both targeted. It is not difficult to review.

The core teams aversion to formatting fixes is disappointing when there are clear, universally agreed C# formatting rules that the project simply doesn't follow. For everyone's benefit these need to get fixed and PR after PR is called out for fixing them. I think this needs to be re-assessed...

As far as automatic formatting I've heard about that for over 5 years now. It was supposed to happen for 12.0. It's desperately needed and things like XAMLStyler setup is very easy at this point. It doesn't take more than an hour.

This reverts commit a4b05d1.
@MrJul
MrJul added this pull request to the merge queue Oct 8, 2026
Merged via the queue into AvaloniaUI:main with commit 1ac9309 Oct 8, 2026
11 checks passed
@robloo
robloo deleted the robloo/precisearcto-comments-fix branch October 8, 2026 18:12
MrJul pushed a commit that referenced this pull request Oct 9, 2026
* Fix comments for PreciseArcTo() rotation angle units

* Make PreciseEllipticArcHelper access modifiers explicit and restrict EllipticalArc

* Fix indentation

* Revert "Fix indentation"

This reverts commit a4b05d1.
@MrJul MrJul added backported-12.1.x and removed backport-candidate-12.1.x Consider this PR for backporting to 12.1 branch labels Oct 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants