Java icon indicating copy to clipboard operation
Java copied to clipboard

refactor: improve Floor method to handle edge cases

Open vardhan30016 opened this issue 3 months ago • 1 comments

  • Add edge case handling for NaN, Infinity, and out-of-bounds values
  • Improve consistency with Ceil.java implementation
  • Add handling for positive numbers between 0 and 1
  • Update Javadoc to match Ceil.java format and clarity
  • Use long cast to handle larger numbers correctly
  • [ ] I have read CONTRIBUTING.md.
  • [ ] This pull request is all my own work -- I have not plagiarized it.
  • [ ] All filenames are in PascalCase.
  • [ ] All functions and variable names follow Java naming conventions.
  • [ ] All new algorithms have a URL in their comments that points to Wikipedia or other similar explanations.
  • [ ] All new code is formatted with clang-format -i --style=file path/to/your/file.java

vardhan30016 avatar Nov 26 '25 14:11 vardhan30016

Codecov Report

:x: Patch coverage is 85.71429% with 1 line in your changes missing coverage. Please review. :white_check_mark: Project coverage is 78.51%. Comparing base (a14e1e3) to head (57a165b).

Files with missing lines Patch % Lines
src/main/java/com/thealgorithms/maths/Floor.java 85.71% 0 Missing and 1 partial :warning:
Additional details and impacted files
@@             Coverage Diff              @@
##             master    #7138      +/-   ##
============================================
- Coverage     78.51%   78.51%   -0.01%     
- Complexity     6752     6755       +3     
============================================
  Files           759      759              
  Lines         22402    22405       +3     
  Branches       4400     4401       +1     
============================================
+ Hits          17589    17591       +2     
  Misses         4108     4108              
- Partials        705      706       +1     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

:rocket: New features to boost your workflow:
  • :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

codecov-commenter avatar Nov 26 '25 14:11 codecov-commenter

This pull request has been automatically closed because its workflows or checks failed and it has been inactive for more than 14 days. Please fix the workflows and reopen if you'd like to continue. Merging from main/master alone does not count as activity.

github-actions[bot] avatar Dec 11 '25 03:12 github-actions[bot]