Skip to content

Added volume of a torus#7294

Merged
DenizAltunkapan merged 2 commits intoTheAlgorithms:masterfrom
kvadrik:patch-3
Feb 28, 2026
Merged

Added volume of a torus#7294
DenizAltunkapan merged 2 commits intoTheAlgorithms:masterfrom
kvadrik:patch-3

Conversation

@kvadrik
Copy link
Contributor

@kvadrik kvadrik commented Feb 28, 2026

Added function calculation the volume of a torus according to the formula: V = 2 * pi^2 * R * r^2
where R is the major radius and r is the minor radius of the torus.

  • 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 algorithms include a corresponding test class that validates their functionality.
  • All new code is formatted with clang-format -i --style=file path/to/your/file.java

Added function calculation the volume of a torus according to the formula:
V = 2 * pi^2 * R * r^2
where R is the major radius and r is the minor radius of the torus.
@codecov-commenter
Copy link

codecov-commenter commented Feb 28, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 79.40%. Comparing base (ba286b2) to head (8b942e2).

Additional details and impacted files
@@             Coverage Diff              @@
##             master    #7294      +/-   ##
============================================
- Coverage     79.41%   79.40%   -0.01%     
  Complexity     7051     7051              
============================================
  Files           787      787              
  Lines         23106    23107       +1     
  Branches       4542     4542              
============================================
- Hits          18350    18349       -1     
- Misses         4023     4024       +1     
- Partials        733      734       +1     

☔ 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.

@DenizAltunkapan DenizAltunkapan merged commit 0d2a98e into TheAlgorithms:master Feb 28, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants