summaryrefslogtreecommitdiff
path: root/src/lib/elementary/efl_ui_scroll_manager.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/elementary/efl_ui_scroll_manager.c')
-rw-r--r--src/lib/elementary/efl_ui_scroll_manager.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/lib/elementary/efl_ui_scroll_manager.c b/src/lib/elementary/efl_ui_scroll_manager.c
index dd924ed0b8..83794319bd 100644
--- a/src/lib/elementary/efl_ui_scroll_manager.c
+++ b/src/lib/elementary/efl_ui_scroll_manager.c
@@ -1232,7 +1232,8 @@ static inline double
1232_scroll_manager_animation_duration_get(Evas_Coord dx, Evas_Coord dy) 1232_scroll_manager_animation_duration_get(Evas_Coord dx, Evas_Coord dy)
1233{ 1233{
1234 double dist = 0.0, vel = 0.0, dur = 0.0; 1234 double dist = 0.0, vel = 0.0, dur = 0.0;
1235 dist = sqrt(dx * dx + dy *dy); 1235 uint64_t x = abs(dx), y = abs(dy);
1236 dist = sqrt(x * x + y * y);
1236 vel = _elm_config->thumbscroll_friction_standard / _elm_config->thumbscroll_friction; 1237 vel = _elm_config->thumbscroll_friction_standard / _elm_config->thumbscroll_friction;
1237 dur = dist / vel; 1238 dur = dist / vel;
1238 dur = (dur > _elm_config->thumbscroll_friction) ? _elm_config->thumbscroll_friction : dur; 1239 dur = (dur > _elm_config->thumbscroll_friction) ? _elm_config->thumbscroll_friction : dur;