-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
fix: correct division by zero bug in ConvexHull orientation function fixes: #1815 #1817
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
Open
bhautikrathod9
wants to merge
2
commits into
TheAlgorithms:master
from
bhautikrathod9:fix-convex-hull
Open
fix: correct division by zero bug in ConvexHull orientation function fixes: #1815 #1817
bhautikrathod9
wants to merge
2
commits into
TheAlgorithms:master
from
bhautikrathod9:fix-convex-hull
Conversation
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
@bhautikrathod9
bhautikrathod9
requested review from
appgurueu and
raklaptudirm
as code owners
October 3, 2025 08:08
codecov-commenter
commented
Oct 3, 2025
Codecov Report
✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 85.94%. Comparing base (08d8c6b) to head (6035c65).
Additional details and impacted files
@@ Coverage Diff @@ ## master #1817 +/- ## ========================================== + Coverage 85.91% 85.94% +0.02% ========================================== Files 379 379 Lines 19778 19795 +17 Branches 3015 3018 +3 ========================================== + Hits 16993 17012 +19 + Misses 2785 2783 -2
☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.
🚀 New features to boost your workflow:
- ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
- 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
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.
Description
This PR fixes a critical bug in the ConvexHull algorithm and improves the implementation.
Changes Made
ErrortoRangeErrorfor invalid inputsBug Details
Before: The orientation function used division which caused crashes:
After: Using robust cross product: