diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2015-07-19 16:50:41 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2015-07-19 16:50:41 +0200 |
commit | 4da0c0619cbf052eb87a618aba4c8de79f0d4325 (patch) | |
tree | e075b2a2601d6d2f26a8a70fb83cb682cdfb23df /pose-widget/glwidget.cpp | |
parent | f9b5b72cbcf9f121e0184f9a907bbffd7e1e16a9 (diff) | |
parent | a8165591d993a23ae71ea4e5bb7df7596688ef7b (diff) |
Merge branch 'unstable' into trackhat-ui
Diffstat (limited to 'pose-widget/glwidget.cpp')
-rw-r--r-- | pose-widget/glwidget.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pose-widget/glwidget.cpp b/pose-widget/glwidget.cpp index 66527a57..ed4560af 100644 --- a/pose-widget/glwidget.cpp +++ b/pose-widget/glwidget.cpp @@ -193,10 +193,10 @@ vec2 GLWidget::project(const vec3 &point) double z = std::max(.75, 1. + translation.z()/-60.); int w = width(), h = height(); double x = w * translation.x() / 2. / -40.; - if (abs(x) > w/2) + if (std::abs(x) > w/2) x = x > 0 ? w/2 : w/-2; double y = h * translation.y() / 2. / -40.; - if (abs(y) > h/2) + if (std::abs(y) > h/2) y = y > 0 ? h/2 : h/-2; return vec2 { z * (ret.x() + x), z * (ret.y() + y) }; } |