summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChunEon Park <hermet@hermet.pe.kr>2014-12-05 23:24:16 +0900
committerChunEon Park <hermet@hermet.pe.kr>2014-12-05 23:24:16 +0900
commit44f0f3e1707f0ade71eb7ccab5ecc70494c00ad8 (patch)
tree0e1c8534ae5b095fbe304c4ab6bca517373ea6c7
parent2e1032e28f0cd704ffaf28cea0b5ad533ae2b6c1 (diff)
ecore/animator: simpler code
-rw-r--r--src/lib/ecore/ecore_anim.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/lib/ecore/ecore_anim.c b/src/lib/ecore/ecore_anim.c
index 3b8f987..3aa1a68 100644
--- a/src/lib/ecore/ecore_anim.c
+++ b/src/lib/ecore/ecore_anim.c
@@ -317,9 +317,15 @@ _pos_map_cubic_bezier(double pos,
317 if (x1 == y1 && x2 == y2) return pos; 317 if (x1 == y1 && x2 == y2) return pos;
318 318
319 /* Bezier Cubic formula: 319 /* Bezier Cubic formula:
320 y(t) = (1 - t)^3 + 3t(1 - t)^2 + 3t^2(1 - t) + t^3 */ 320 y(t) = (1 - t)^3 + 3t(1 - t)^2 + 3t^2(1 - t) + t^3 */
321 return (pow((1 - pos), 3) * 0) + (3 * pos * pow((1 - pos), 2) * y1) + 321
322 (3 * pow(pos, 2) * (1 - pos) * y2) + (pow(pos, 3) * 1); 322 /* orignal */
323 // return (pow((1 - pos), 3) * 0) + (3 * pos * pow((1 - pos), 2) * y1) +
324 // (3 * pow(pos, 2) * (1 - pos) * y2) + (pow(pos, 3) * 1);
325
326 /* simpler one */
327 return (3 * pos * pow((1 - pos), 2) * y1) +
328 (3 * pow(pos, 2) * (1 - pos) * y2) + (pow(pos, 3) * 1);
323} 329}
324 330
325#define DBL_TO(Fp) eina_f32p32_double_to(Fp) 331#define DBL_TO(Fp) eina_f32p32_double_to(Fp)