Repository navigation
fix(maths): correct coordinate subtraction in DistanceFormula.euclideanDistance - #7747
Merged
DenizAltunkapan merged 2 commits intoNov 12, 2026
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #7747 +/- ##
=========================================
Coverage 82.34% 82.34%
- Complexity 8446 8447 +1
=========================================
Files 843 843
Lines 26156 26156
Branches 5110 5110
=========================================
+ Hits 21537 21539 +2
+ Misses 3831 3830 -1
+ Partials 788 787 -1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
spidervirus
marked this pull request as ready for review
November 11, 2026 14:41
spidervirus
requested review from
DenizAltunkapan,
alxkm and
yanglbme
as code owners
November 11, 2026 14:41
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
clang-format -i --style=file path/to/your/file.javaDescription
Fixes #7746
In
DistanceFormula.euclideanDistance, the variabledYwas calculated usingMath.pow(y2 - x1, 2)wherex1was incorrectly used instead ofy1.This PR:
dYto computeMath.pow(y2 - y1, 2).DistanceFormulaTest.javawith the mathematically exact Euclidean distances.