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>
This commit is contained in:
Daniel Willmann 2013-05-16 18:09:14 +01:00
parent 62325dd693
commit 04829b9244
1 changed files with 4 additions and 3 deletions

View File

@ -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;
}