diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2017-04-12 01:44:47 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2017-04-12 01:50:00 +0200 |
commit | 288d9d1024e08b203e06a01cb23b0e971c78c260 (patch) | |
tree | 91ceafd7b8943b6c13620958a3af3c9eb7c1a6d1 | |
parent | 8731b350d7210505994fdfec6dc1cfa4bbf015d7 (diff) |
pose-widget: fix some breakage, forgot what it was
-rw-r--r-- | pose-widget/pose-widget.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/pose-widget/pose-widget.cpp b/pose-widget/pose-widget.cpp index 8ccec988..751c4700 100644 --- a/pose-widget/pose-widget.cpp +++ b/pose-widget/pose-widget.cpp @@ -350,16 +350,16 @@ void pose_transform::project_quad_texture() vec2 pose_transform::project(const vec3 &point) { - using std::fabsf; + using std::fabs; vec3 ret = rotation * point; num z = std::max<num>(.5, 1 + translation.z()/-80); num w = width, h = height; num x = w * translation.x() / 2 / -80; - if (fabsf(x) > w/2) + if (fabs(x) > w/2) x = x > 0 ? w/2 : w/-2; num y = h * translation.y() / 2 / -80; - if (fabsf(y) > h/2) + if (fabs(y) > h/2) y = y > 0 ? h/2 : h/-2; return vec2(z * (ret.x() + x), z * (ret.y() + y)); } |