| 125 | } |
| 126 | |
| 127 | void Grid::offset(std::array<double, 3>& vals) |
| 128 | { |
| 129 | // Divide before sum to avoid overflow. |
| 130 | vals[0] = m_bounds.maxx / 2 + m_bounds.minx / 2; |
| 131 | vals[1] = m_bounds.maxy / 2 + m_bounds.miny / 2; |
| 132 | vals[2] = m_bounds.maxz / 2 + m_bounds.minz / 2; |
| 133 | } |
| 134 | |
| 135 | void Grid::scale(std::array<double, 3>& vals) |
| 136 | { |