diff options
author | Kent Hansen <khansen@trolltech.com> | 2009-04-29 15:07:57 (GMT) |
---|---|---|
committer | Kent Hansen <khansen@trolltech.com> | 2009-04-29 15:07:57 (GMT) |
commit | 19e7d27d9c107b69157591edd09a36e87c9d93b2 (patch) | |
tree | c54a4942ed84f78514317bb14f04bffc12a4b7c9 | |
parent | b599036b8cf4eda2a12a0127a484dff659e594b8 (diff) | |
parent | c11686d88a4329c4c86d1b7090fbe5c004c42f64 (diff) | |
download | Qt-19e7d27d9c107b69157591edd09a36e87c9d93b2.zip Qt-19e7d27d9c107b69157591edd09a36e87c9d93b2.tar.gz Qt-19e7d27d9c107b69157591edd09a36e87c9d93b2.tar.bz2 |
Merge branch 'kinetic-animations' into kinetic-statemachine
-rw-r--r-- | src/3rdparty/easing/easing.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/3rdparty/easing/easing.cpp b/src/3rdparty/easing/easing.cpp index 9177c26..5bd3997 100644 --- a/src/3rdparty/easing/easing.cpp +++ b/src/3rdparty/easing/easing.cpp @@ -321,7 +321,7 @@ static qreal easeInOutExpo(qreal t) if (t==0.0) return qreal(0.0); if (t==1.0) return qreal(1.0); t*=2.0; - if (t < 1) return 0.5 * ::qPow(qreal(2.0), 10 * (t - 1)) - 1.0 * 0.0005; + if (t < 1) return 0.5 * ::qPow(qreal(2.0), 10 * (t - 1)) - 0.0005; return 0.5 * 1.0005 * (-::qPow(qreal(2.0), -10 * (t - 1)) + 2); } @@ -471,8 +471,8 @@ static qreal easeInOutElastic(qreal t, qreal a, qreal p) s = p / (2 * M_PI) * ::asin(1.0 / a); } - if (t < 1) return -.5*(a*::qPow(2.0f,10*(t-1)) * ::sin( ((t-1)*1.0-s)*(2*M_PI)/p )); - return a*::qPow(2.0f,-10*(t-1)) * ::sin( ((t-1)*1.0-s)*(2*M_PI)/p )*.5 + 1.0; + if (t < 1) return -.5*(a*::qPow(2.0f,10*(t-1)) * ::sin( (t-1-s)*(2*M_PI)/p )); + return a*::qPow(2.0f,-10*(t-1)) * ::sin( (t-1-s)*(2*M_PI)/p )*.5 + 1.0; } /** |