summaryrefslogtreecommitdiffhomepage
path: root/pose-widget/pose-widget.cpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2017-04-12 01:44:47 +0200
committerStanislaw Halik <sthalik@misaki.pl>2017-04-12 01:50:00 +0200
commit288d9d1024e08b203e06a01cb23b0e971c78c260 (patch)
tree91ceafd7b8943b6c13620958a3af3c9eb7c1a6d1 /pose-widget/pose-widget.cpp
parent8731b350d7210505994fdfec6dc1cfa4bbf015d7 (diff)
pose-widget: fix some breakage, forgot what it was
Diffstat (limited to 'pose-widget/pose-widget.cpp')
-rw-r--r--pose-widget/pose-widget.cpp6
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));
}