From 0856e14a2863e5cc355306f898096507f46dfec3 Mon Sep 17 00:00:00 2001 From: infirit Date: Wed, 26 Nov 2014 22:11:15 +0100 Subject: geyes: use fabs instead of abs on float --- geyes/geyes.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'geyes/geyes.c') diff --git a/geyes/geyes.c b/geyes/geyes.c index 262f63db..1652aaf3 100644 --- a/geyes/geyes.c +++ b/geyes/geyes.c @@ -105,8 +105,8 @@ calculate_pupil_xy (EyesApplet *eyes_applet, ny = y - MAX(height- eyes_applet->eye_height, 0) * yalign - eyes_applet->eye_height / 2; h = hypot (nx, ny); - if (h < 0.5 || abs (h) - < (abs (hypot (eyes_applet->eye_height / 2, eyes_applet->eye_width / 2)) - eyes_applet->wall_thickness - eyes_applet->pupil_height)) { + if (h < 0.5 || fabs (h) + < (fabs (hypot (eyes_applet->eye_height / 2, eyes_applet->eye_width / 2)) - eyes_applet->wall_thickness - eyes_applet->pupil_height)) { *pupil_x = nx + eyes_applet->eye_width / 2; *pupil_y = ny + eyes_applet->eye_height / 2; return; -- cgit v1.2.1