diff options
author | Thierry Bastian <thierry.bastian@nokia.com> | 2009-04-29 16:41:12 +0200 |
---|---|---|
committer | Thierry Bastian <thierry.bastian@nokia.com> | 2009-04-29 16:43:55 +0200 |
commit | c11686d88a4329c4c86d1b7090fbe5c004c42f64 (patch) | |
tree | 9ff17c241af7dfc3c60e95c6aff0045d7c4bbc2f /src/3rdparty/easing/easing.cpp | |
parent | eea1c9f34b9b98c55c48f9ed1dbef9a9883c6f2a (diff) | |
download | qt4-tools-c11686d88a4329c4c86d1b7090fbe5c004c42f64.tar.gz |
remove multiplication by 1 in easing curves
Diffstat (limited to 'src/3rdparty/easing/easing.cpp')
-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 9177c2655a..5bd39976b4 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; } /** |