Skip to content

Commit

Permalink
Grid fix for negative Y camera position (#121)
Browse files Browse the repository at this point in the history
  • Loading branch information
seanmiddleditch committed Aug 21, 2019
1 parent 9cfba97 commit af955cf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion source/app/shell/private/shell_app.cpp
Expand Up @@ -357,7 +357,7 @@ void up::ShellApp::_drawGrid() {
// Improvements welcome.
//
auto const cameraPos = _camera.position();
auto const logDist = std::log2(cameraPos.y);
auto const logDist = std::log2(std::abs(cameraPos.y));
auto const spacing = std::max(1, static_cast<int>(logDist) - 3);

int guideSpacing = guidelines * spacing;
Expand Down

0 comments on commit af955cf

Please sign in to comment.