interface_scrollable: convert to int before using abs first

@fix
This commit is contained in:
Daniel Kolesa 2015-07-29 15:29:53 +01:00
parent a91b54644b
commit df1b9b8455
1 changed files with 6 additions and 6 deletions

View File

@ -1305,9 +1305,9 @@ _elm_scroll_bounce_x_animator(void *data)
r = 1.0;
if (sid->down.momentum_animator)
{
ed = fabs(sid->down.dx * (_elm_config->thumbscroll_friction +
sid->down.extra_time) - sid->down.b0x);
md = fabs(_elm_config->thumbscroll_friction * 5 * w);
ed = abs((int)(sid->down.dx * (_elm_config->thumbscroll_friction +
sid->down.extra_time) - sid->down.b0x));
md = abs((int)(_elm_config->thumbscroll_friction * 5 * w));
if (ed > md) r = (double)(md) / (double)ed;
}
x = sid->down.b2x + (int)((double)(dx - odx) * r);
@ -1361,9 +1361,9 @@ _elm_scroll_bounce_y_animator(void *data)
r = 1.0;
if (sid->down.momentum_animator)
{
ed = fabs(sid->down.dy * (_elm_config->thumbscroll_friction +
sid->down.extra_time) - sid->down.b0y);
md = fabs(_elm_config->thumbscroll_friction * 5 * h);
ed = abs((int)(sid->down.dy * (_elm_config->thumbscroll_friction +
sid->down.extra_time) - sid->down.b0y));
md = abs((int)(_elm_config->thumbscroll_friction * 5 * h));
if (ed > md) r = (double)(md) / (double)ed;
}
y = sid->down.b2y + (int)((double)(dy - ody) * r);