| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
The validation throws when N <= 0, and the docstring states 'N must be > 0', but the message claimed 'N has to be >= 2'. N = 1 is valid for the midpoint rule, so the message now matches the actual check. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Codecov Report❌ Patch coverage is 0% with 1 line in your changes missing coverage. Please review.
@@ Coverage Diff @@
## master #1902 +/- ##
=======================================
Coverage 85.91% 85.91%
=======================================
Files 379 379
Lines 19778 19778
Branches 3016 3016
=======================================
Hits 16993 16993
Misses 2785 2785 ☔ View full report in Codecov by Harness.
|
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Description
In Maths/MidpointIntegration.js the guard rejects non-positive N:
The thrown message says 'N has to be >= 2', but:
N = 1 is a valid number of subintervals for the midpoint rule, so the >= 2 message is incorrect and misleading. This changes it to 'N has to be > 0' to match the actual validation and the documentation.
(Note: the analogous >= 2 message in SimpsonIntegration.js is correct there, since Simpson's rule additionally requires an even N, so the minimum is 2 — left unchanged.)
Checklist
🤖 Generated with Claude Code