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>
This commit is contained in:
Umesh Tanwar 2017-03-14 14:24:16 +05:30 committed by Amitesh Singh
parent c68a409874
commit b938e2b5d8
1 changed files with 1 additions and 1 deletions

View File

@ -983,7 +983,7 @@ _ecore_animator_run(void *data)
pos = 0.0;
}
run_ret = animator->run_func(animator->run_data, pos);
if (t >= (animator->start + animator->run)) run_ret = EINA_FALSE;
if (t >= (animator->start + animator->run) && (pos >= 1.0)) run_ret = EINA_FALSE;
return run_ret;
}