FEAT(geometry): Add Haversine formula and fix build issues#6650
Merged
alxkm merged 1 commit intoTheAlgorithms:masterfrom Oct 5, 2025
Merged
FEAT(geometry): Add Haversine formula and fix build issues#6650alxkm merged 1 commit intoTheAlgorithms:masterfrom
alxkm merged 1 commit intoTheAlgorithms:masterfrom
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #6650 +/- ##
============================================
+ Coverage 75.74% 75.75% +0.01%
- Complexity 5771 5773 +2
============================================
Files 702 703 +1
Lines 19770 19777 +7
Branches 3832 3832
============================================
+ Hits 14975 14983 +8
Misses 4215 4215
+ Partials 580 579 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
adfc73f to
02a23a8
Compare
02a23a8 to
397bfdd
Compare
alxkm
approved these changes
Oct 5, 2025
Member
alxkm
left a comment
There was a problem hiding this comment.
Looks good. Thank for the contribution.
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.
Hello! This PR adds the Haversine formula algorithm and also includes two small fixes for issues I found while setting up the development environment.
This implementation is of the
Haversineformula to calculate the distance between two points on a sphereNew Feature: Haversine Formula
Haversine.java) to thegeometrypackage. This algorithm calculates the great-circle distance between two points on a sphere using their latitude and longitude.HaversineTest.java) with multiple test cases to ensure correctness.Build and Bug Fixes
To get the project to build and run tests successfully, I also made the following corrections:
pom.xml: Updated the Maven compiler plugin configuration from<source>/<target>to the modern<release>tag. This resolves a build warning that was treated as an error when using newer JDKs.PartitionProblem.java: Corrected a Javadoc formatting error where the comment was placed before thepackagedeclaration, which caused a build failure due to the-Werrorflag.All tests pass successfully with these changes. Let me know if any further modifications are needed!