summaryrefslogtreecommitdiffhomepage
path: root/pose-widget
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2015-10-03 17:50:19 +0200
committerStanislaw Halik <sthalik@misaki.pl>2015-10-03 17:50:19 +0200
commit010247f8b1aa0526d523683e2e94b0bb66130d02 (patch)
treef082f8d27e6f44b64909fb2df142b196f5a6fc82 /pose-widget
parentb48dc50d05f984c7b61bb6013f45301850eab4a9 (diff)
pose-widget: simplify
Diffstat (limited to 'pose-widget')
-rw-r--r--pose-widget/glwidget.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/pose-widget/glwidget.cpp b/pose-widget/glwidget.cpp
index 1e256104..3ee480a1 100644
--- a/pose-widget/glwidget.cpp
+++ b/pose-widget/glwidget.cpp
@@ -167,12 +167,12 @@ void GLWidget::project_quad_texture() {
+ uv.x() * (origs[i][2].y() - origs[i][0].y())
+ uv.y() * (origs[i][1].y() - origs[i][0].y());
- const int px_ = std::max<int>(0, fx + .5f);
- const int py_ = std::max<int>(0, fy + .5f);
+ const int px_ = fx + .5f;
+ const int py_ = fy + .5f;
const int px = fx;
const int py = fy;
- const float ax_ = fabs(fx - px);
- const float ay_ = fabs(fy - py);
+ const float ax_ = fx - px;
+ const float ay_ = fy - py;
const float ax = 1.f - ax_;
const float ay = 1.f - ay_;