summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUmesh Tanwar <umesh.tanwar@samsung.com>2017-03-14 14:24:16 +0530
committerAmitesh Singh <amitesh.sh@samsung.com>2017-03-14 14:38:44 +0530
commitb938e2b5d873a98bad608e6856417d0bbabbbfc3 (patch)
treea7d2d2408b64ae665f9de7fdd548a3838375c005
parentc68a40987404375b36460b6a7f5ccceb45444b57 (diff)
ecore_animator: improve comparision check for stopping animator.
Summary: Time cmparision does not ensure the corrctness of posotion. It is beacuse of double number calculation. Double number calculation are not convertable.for example: 1/39 = 0.02564102564; but 0.02564102564 * 39 = 0.99999999996 != 1; The addition check for pos ensure the pos to be reached at its correct position. @fix Signed-off-by: Umesh Tanwar <umesh.tanwar@samsung.com> Reviewers: cedric, singh.amitesh, jpeg, raster Reviewed By: raster Subscribers: atulfokk, cedric, jpeg Differential Revision: https://phab.enlightenment.org/D4709 Signed-off-by: Amitesh Singh <amitesh.sh@samsung.com>
-rw-r--r--src/lib/ecore/ecore_anim.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/ecore/ecore_anim.c b/src/lib/ecore/ecore_anim.c
index 461d035152..84e31e1a40 100644
--- a/src/lib/ecore/ecore_anim.c
+++ b/src/lib/ecore/ecore_anim.c
@@ -983,7 +983,7 @@ _ecore_animator_run(void *data)
983 pos = 0.0; 983 pos = 0.0;
984 } 984 }
985 run_ret = animator->run_func(animator->run_data, pos); 985 run_ret = animator->run_func(animator->run_data, pos);
986 if (t >= (animator->start + animator->run)) run_ret = EINA_FALSE; 986 if (t >= (animator->start + animator->run) && (pos >= 1.0)) run_ret = EINA_FALSE;
987 return run_ret; 987 return run_ret;
988} 988}
989 989