From ade718e808f87b0d9fa90851d1b59ef152e2bc85 Mon Sep 17 00:00:00 2001 From: rhijmans Date: Sun, 29 Dec 2024 13:01:26 -0800 Subject: [PATCH] p --- src/sample.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sample.cpp b/src/sample.cpp index 393f5a75d..9540b0d9e 100644 --- a/src/sample.cpp +++ b/src/sample.cpp @@ -27,7 +27,7 @@ void get_nx_ny(size_t size, size_t &nx, size_t &ny) { double nxy = nx * ny; if (size < nxy) { - double f = sqrt(size / ncell ); + double f = sqrt(size / nxy ); double fnx = nx * f; double fny = ny * f; double s = fnx * fny;