From 288d9d1024e08b203e06a01cb23b0e971c78c260 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Wed, 12 Apr 2017 01:44:47 +0200 Subject: pose-widget: fix some breakage, forgot what it was --- pose-widget/pose-widget.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'pose-widget') 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(.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)); } -- cgit v1.2.3