asdfuser pushed a commit to branch master.
commit 04829b9244402972d7e9c05fdcda0b56c6bf813e
Author: Daniel Willmann <[email protected]>
Date: Thu May 16 18:09:14 2013 +0100
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 <[email protected]>
---
src/lib/ecore/ecore_anim.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/src/lib/ecore/ecore_anim.c b/src/lib/ecore/ecore_anim.c
index 39cc560..006e180 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;
}
--
------------------------------------------------------------------------------
AlienVault Unified Security Management (USM) platform delivers complete
security visibility with the essential security capabilities. Easily and
efficiently configure, manage, and operate all of your security controls
from a single console and one unified framework. Download a free trial.
http://p.sf.net/sfu/alienvault_d2d