[FEAT] Add general purpose Projectile Motion algorithm (Physics)#6928
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #6928 +/- ##
============================================
+ Coverage 78.15% 78.17% +0.02%
- Complexity 6503 6509 +6
============================================
Files 741 742 +1
Lines 21675 21697 +22
Branches 4236 4237 +1
============================================
+ Hits 16940 16962 +22
Misses 4063 4063
Partials 672 672 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
1d42209 to
4561ebd
Compare
4561ebd to
a9df3f6
Compare
|
Hello @alxkm @DenizAltunkapan @yanglbme , I had to close a couple of previous attempts now re-submitted as PR (#6855) and this PR due to some persistent CI errors that seemed related to older tests inherited from the master branch specifically from So i created these new PRs from fresh branches specifically to resolve those issues and ensure a clean build. Hoping to get these contributions reviewed and possibly merged for Hacktoberfest! 🎃 Could you please take a look when you have a moment? Thanks so much for your time and help! |
This PR adds a new, general-purpose algorithm that calculates the time of flight, horizontal range, and maximum height for a projectile launched from any non-negative initial height in
ProjectileMotion.javaclang-format -i --style=file src\main\java\com\thealgorithms\physics\ProjectileMotion.javaThis returns all calculated values in a single, convenient Result object. I have run the tests locally, and all cases pass successfully.