From 1cdd3765d62aff664bb71ed355d6c14cf7a27ab8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Mon, 19 May 2014 11:24:06 +0200 Subject: [PATCH] goom: Use fabs() instead of abs() to calculate the floating point absolute value tentacle3d.c:268:7: error: using integer absolute value function 'abs' when argument is of floating point type [-Werror,-Wabsolute-value] if (abs (tmp - fx_data->rot) > abs (tmp - (fx_data->rot + 2.0 * G_PI))) { ^ --- gst/goom/tentacle3d.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gst/goom/tentacle3d.c b/gst/goom/tentacle3d.c index 2abe42fc25..f82ffba380 100644 --- a/gst/goom/tentacle3d.c +++ b/gst/goom/tentacle3d.c @@ -265,12 +265,13 @@ pretty_move (PluginInfo * goomInfo, float cycle, float *dist, float *dist2, tmp = cycle - (G_PI * 2.0) * floor (cycle / (G_PI * 2.0)); } - if (abs (tmp - fx_data->rot) > abs (tmp - (fx_data->rot + 2.0 * G_PI))) { + if (fabs (tmp - fx_data->rot) > fabs (tmp - (fx_data->rot + 2.0 * G_PI))) { fx_data->rot = (tmp + 15.0f * (fx_data->rot + 2 * G_PI)) / 16.0f; if (fx_data->rot > 2.0 * G_PI) fx_data->rot -= 2.0 * G_PI; *rotangle = fx_data->rot; - } else if (abs (tmp - fx_data->rot) > abs (tmp - (fx_data->rot - 2.0 * G_PI))) { + } else if (fabs (tmp - fx_data->rot) > + fabs (tmp - (fx_data->rot - 2.0 * G_PI))) { fx_data->rot = (tmp + 15.0f * (fx_data->rot - 2.0 * G_PI)) / 16.0f; if (fx_data->rot < 0.0f) fx_data->rot += 2.0 * G_PI;