Opened 7 weeks ago
Last modified 18 hours ago
#24945 new task
refactor(aligninline): optimize geometry calculations and fix numerical edge cases
| Reported by: | Owned by: | team | |
|---|---|---|---|
| Priority: | normal | Milestone: | 26.12 |
| Component: | Core | Version: | |
| Keywords: | Cc: |
Description
- Improve Line constructor and intersectionCommand by caching
Node.getEastNorth()results, preventing redundant dynamic coordinate calculations. - Replace manual Euclidean distance calculation with
Math.hypot(a, b)in Line constructor to eliminate risk of floating-point overflow/underflow. - Fix English grammar typo ("parallels ways" to "parallel ways") in user-facing translation string.
Attachments (3)
Change History (9)
by , 7 weeks ago
| Attachment: | patch_24945.txt added |
|---|
comment:1 by , 7 weeks ago
comment:3 by , 9 days ago
| Milestone: | → 26.12 |
|---|
comment:4 by , 20 hours ago
@stoecker Can't remember. Do we want to avoid the var keyword? There was a discussion about this, right?
Besides this the patch looks OK, although I see no advantage in all those added final statements and curly brackets.
comment:5 by , 20 hours ago
Unit test AlignInLineActionTest.testLineSameCoordinates2() fails with the patch
comment:6 by , 18 hours ago
I don't like var very much and prefer real types, but it is not forbidden.
It makes SONAR silent and does no harm, so the final's are fine. The braces prevent coding issues. Personally I usually do no braces for short one-lines and use them for everything else except I forget them :-)



Your patch introduces unwanted tab stops.