summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/easing/easing.cpp
diff options
context:
space:
mode:
authorMichael Brasser <michael.brasser@nokia.com>2009-12-17 23:46:27 (GMT)
committerMichael Brasser <michael.brasser@nokia.com>2009-12-17 23:46:27 (GMT)
commita60c9a1ff41e5ca1482121ff3f89a112b359b6d4 (patch)
treeebe4f5e941eb3bda28593c2b170101867cb0afe3 /src/3rdparty/easing/easing.cpp
parent412920402f488c2cf6eb81e7582f9b5aa7b06680 (diff)
parentb8a4b365b1105a742369bbaa5dc00e43914089e0 (diff)
downloadQt-a60c9a1ff41e5ca1482121ff3f89a112b359b6d4.zip
Qt-a60c9a1ff41e5ca1482121ff3f89a112b359b6d4.tar.gz
Qt-a60c9a1ff41e5ca1482121ff3f89a112b359b6d4.tar.bz2
Merge branch '4.6' of scm.dev.nokia.troll.no:qt/qt into kinetic-declarativeui
Conflicts: .gitignore tests/benchmarks/benchmarks.pro
Diffstat (limited to 'src/3rdparty/easing/easing.cpp')
-rw-r--r--src/3rdparty/easing/easing.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/3rdparty/easing/easing.cpp b/src/3rdparty/easing/easing.cpp
index 81af40f..7d70a4d 100644
--- a/src/3rdparty/easing/easing.cpp
+++ b/src/3rdparty/easing/easing.cpp
@@ -252,7 +252,7 @@ static qreal easeOutInQuint(qreal t)
*/
static qreal easeInSine(qreal t)
{
- return (t == 1.0) ? 1.0 : -::cos(t * M_PI_2) + 1.0;
+ return (t == 1.0) ? 1.0 : -::qCos(t * M_PI_2) + 1.0;
}
/**
@@ -263,7 +263,7 @@ static qreal easeInSine(qreal t)
*/
static qreal easeOutSine(qreal t)
{
- return ::sin(t* M_PI_2);
+ return ::qSin(t* M_PI_2);
}
/**
@@ -274,7 +274,7 @@ static qreal easeOutSine(qreal t)
*/
static qreal easeInOutSine(qreal t)
{
- return -0.5 * (::cos(M_PI*t) - 1);
+ return -0.5 * (::qCos(M_PI*t) - 1);
}
/**
@@ -397,15 +397,15 @@ static qreal easeInElastic_helper(qreal t, qreal b, qreal c, qreal d, qreal a, q
if (t_adj==1) return b+c;
qreal s;
- if(a < ::fabs(c)) {
+ if(a < ::qFabs(c)) {
a = c;
s = p / 4.0f;
} else {
- s = p / (2 * M_PI) * ::asin(c / a);
+ s = p / (2 * M_PI) * ::qAsin(c / a);
}
t_adj -= 1.0f;
- return -(a*::qPow(2.0f,10*t_adj) * ::sin( (t_adj*d-s)*(2*M_PI)/p )) + b;
+ return -(a*::qPow(2.0f,10*t_adj) * ::qSin( (t_adj*d-s)*(2*M_PI)/p )) + b;
}
/**
@@ -431,10 +431,10 @@ static qreal easeOutElastic_helper(qreal t, qreal /*b*/, qreal c, qreal /*d*/, q
a = c;
s = p / 4.0f;
} else {
- s = p / (2 * M_PI) * ::asin(c / a);
+ s = p / (2 * M_PI) * ::qAsin(c / a);
}
- return (a*::qPow(2.0f,-10*t) * ::sin( (t-s)*(2*M_PI)/p ) + c);
+ return (a*::qPow(2.0f,-10*t) * ::qSin( (t-s)*(2*M_PI)/p ) + c);
}
/**
@@ -469,11 +469,11 @@ static qreal easeInOutElastic(qreal t, qreal a, qreal p)
a = 1.0;
s = p / 4.0f;
} else {
- s = p / (2 * M_PI) * ::asin(1.0 / a);
+ s = p / (2 * M_PI) * ::qAsin(1.0 / a);
}
- 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;
+ if (t < 1) return -.5*(a*::qPow(2.0f,10*(t-1)) * ::qSin( (t-1-s)*(2*M_PI)/p ));
+ return a*::qPow(2.0f,-10*(t-1)) * ::qSin( (t-1-s)*(2*M_PI)/p )*.5 + 1.0;
}
/**