diff options
author | Thierry Bastian <thierry.bastian@nokia.com> | 2009-04-29 14:41:12 (GMT) |
---|---|---|
committer | Thierry Bastian <thierry.bastian@nokia.com> | 2009-04-29 14:43:55 (GMT) |
commit | c11686d88a4329c4c86d1b7090fbe5c004c42f64 (patch) | |
tree | 9ff17c241af7dfc3c60e95c6aff0045d7c4bbc2f /src | |
parent | eea1c9f34b9b98c55c48f9ed1dbef9a9883c6f2a (diff) | |
download | Qt-c11686d88a4329c4c86d1b7090fbe5c004c42f64.zip Qt-c11686d88a4329c4c86d1b7090fbe5c004c42f64.tar.gz Qt-c11686d88a4329c4c86d1b7090fbe5c004c42f64.tar.bz2 |
remove multiplication by 1 in easing curves
Diffstat (limited to 'src')
-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; } /** |