Skip to content

Commit f5a39b4

Browse files
The9CatCopilot
andauthored
Potential fix for pull request finding
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
1 parent 627de49 commit f5a39b4

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

utils/Test/testEmpDeproj.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,8 +150,8 @@ int main(int argc, char* argv[])
150150

151151
std::vector<double> r_eval;
152152
for (int i = 0; i < Nr; ++i) {
153-
double t = (double)i / (Nr - 1);
154-
r_eval.push_back(0.01 + t * 8.0);
153+
double t = (Nr > 1) ? static_cast<double>(i) / (Nr - 1) : 0.0;
154+
r_eval.push_back(Rmin + t * (Rmax - Rmin));
155155
}
156156
auto rho = D.rho(r_eval);
157157

0 commit comments

Comments
 (0)