diff options
author | Daniel Willmann <d.willmann@samsung.com> | 2013-05-16 18:09:14 +0100 |
---|---|---|
committer | Daniel Willmann <d.willmann@samsung.com> | 2013-05-17 17:15:27 +0100 |
commit | 04829b9244402972d7e9c05fdcda0b56c6bf813e (patch) | |
tree | d965ce385187bbabd2ab097215b5184fec7a2f1a /src/lib/ecore | |
parent | 62325dd693a82c4f10d7d5c46a65b1f4b75df22c (diff) |
ecore_animator: Ensure correct start/end values are returned.
Make sure pos_map(0) == 0 and pos_map(1) == 1
Signed-off-by: Daniel Willmann <d.willmann@samsung.com>
Diffstat (limited to 'src/lib/ecore')
-rw-r--r-- | src/lib/ecore/ecore_anim.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/lib/ecore/ecore_anim.c b/src/lib/ecore/ecore_anim.c index 39cc560a5e..006e180d59 100644 --- a/src/lib/ecore/ecore_anim.c +++ b/src/lib/ecore/ecore_anim.c | |||
@@ -337,9 +337,9 @@ ecore_animator_pos_map(double pos, | |||
337 | double v2) | 337 | double v2) |
338 | { | 338 | { |
339 | /* purely functional - locking not required */ | 339 | /* purely functional - locking not required */ |
340 | if (pos > 1.0) pos = 1.0; | 340 | if (pos >= 1.0) return 1.0; |
341 | else if (pos < 0.0) | 341 | else if (pos <= 0.0) |
342 | pos = 0.0; | 342 | return 0.0; |
343 | switch (map) | 343 | switch (map) |
344 | { | 344 | { |
345 | case ECORE_POS_MAP_LINEAR: | 345 | case ECORE_POS_MAP_LINEAR: |
@@ -390,6 +390,7 @@ ecore_animator_pos_map(double pos, | |||
390 | default: | 390 | default: |
391 | return pos; | 391 | return pos; |
392 | } | 392 | } |
393 | |||
393 | return pos; | 394 | return pos; |
394 | } | 395 | } |
395 | 396 | ||