We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 001adf5 commit bbf68f0Copy full SHA for bbf68f0
2 files changed
src/differint.cpp
@@ -148,8 +148,9 @@ T GLpoint(T alpha,
148
T domain_start,
149
T domain_end,
150
std::size_t num_points) {
151
- if (num_points < 1) {
152
- throw std::invalid_argument("num_points must be at least 1");
+ // Need at least two points to compute a meaningful step size
+ if (num_points < 2) {
153
+ throw std::invalid_argument("num_points must be at least 2");
154
}
155
if (domain_start > domain_end) {
156
std::swap(domain_start, domain_end);
todo.md
0 commit comments