From 62f88917799282093f56bf2dc3426ca3784ea4d3 Mon Sep 17 00:00:00 2001 From: Andrew Bell Date: Mon, 30 Aug 2021 09:02:24 -0400 Subject: [PATCH] Fix grid size when we're using a minimum sized grid. Close #63 --- epf/FileProcessor.cpp | 2 +- epf/Grid.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/epf/FileProcessor.cpp b/epf/FileProcessor.cpp index be99e3b..0f4c900 100644 --- a/epf/FileProcessor.cpp +++ b/epf/FileProcessor.cpp @@ -74,7 +74,7 @@ void FileProcessor::run() cell = m_cellMgr.get(cellIndex); cell->copyPoint(p); } - // Advance the cell - move the buffer pointer so when refer to the cell's + // Advance the cell - move the buffer pointer so when we refer to the cell's // point, we're referring to the next location in the cell's buffer. cell->advance(); count++; diff --git a/epf/Grid.cpp b/epf/Grid.cpp index 8109354..89f6a37 100644 --- a/epf/Grid.cpp +++ b/epf/Grid.cpp @@ -73,7 +73,7 @@ void Grid::resetLevel(int level) { // We have to have at least level 1 or things break when sampling. m_maxLevel = (std::max)(level, 1); - m_gridSize = (int)std::pow(2, level); + m_gridSize = (int)std::pow(2, m_maxLevel); if (m_cubic) {