BCSTM-Player |
This commit is contained in:
31
external/tween-engine/src/equations/Quint.cpp
vendored
Normal file
31
external/tween-engine/src/equations/Quint.cpp
vendored
Normal file
@ -0,0 +1,31 @@
|
||||
//
|
||||
// Quint.cpp
|
||||
//
|
||||
// This code is derived from Universal Tween Engine
|
||||
// Licensed under Apache License 2.0 - http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
|
||||
#include <TweenEngine/equations/Quint.h>
|
||||
|
||||
namespace TweenEngine
|
||||
{
|
||||
float QuintIn::compute(float t) { return t*t*t*t*t; }
|
||||
const char *QuintIn::toString() { return "Quint.IN"; }
|
||||
|
||||
float QuintOut::compute(float t) {
|
||||
t-=1;
|
||||
return -(t*t*t*t*t - 1);
|
||||
}
|
||||
const char *QuintOut::toString() { return "Quint.OUT"; }
|
||||
|
||||
float QuintInOut::compute(float t) {
|
||||
t *= 2;
|
||||
if (t < 1) {
|
||||
return 0.5f*t*t*t*t*t;
|
||||
} else {
|
||||
t -= 2;
|
||||
return -0.5f * (t*t*t*t*t - 2);
|
||||
}
|
||||
}
|
||||
const char *QuintInOut::toString() { return "Quint.INOUT"; }
|
||||
}
|
Reference in New Issue
Block a user