summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Willmann <d.willmann@samsung.com>2013-05-16 18:09:14 +0100
committerDaniel Willmann <d.willmann@samsung.com>2013-05-17 17:15:27 +0100
commit04829b9244402972d7e9c05fdcda0b56c6bf813e (patch)
treed965ce385187bbabd2ab097215b5184fec7a2f1a
parent62325dd693a82c4f10d7d5c46a65b1f4b75df22c (diff)
downloadefl-04829b9244402972d7e9c05fdcda0b56c6bf813e.tar.gz
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>
-rw-r--r--src/lib/ecore/ecore_anim.c7
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,
double v2)
{
/* purely functional - locking not required */
- if (pos > 1.0) pos = 1.0;
- else if (pos < 0.0)
- pos = 0.0;
+ if (pos >= 1.0) return 1.0;
+ else if (pos <= 0.0)
+ return 0.0;
switch (map)
{
case ECORE_POS_MAP_LINEAR:
@@ -390,6 +390,7 @@ ecore_animator_pos_map(double pos,
default:
return pos;
}
+
return pos;
}