RenderInfo amb tres estats (off/dalt/baix), temps de joc i persistència; ombra, mono-dígits i easing compartits (v0.14.0)
This commit is contained in:
1 parent
46a578fd86
commit
6f3fafbfff
17 files changed
+376
-97
No files matched your search
@@ -0,0 +1,26 @@
|
||||
#include "utils/easing.hpp"
|
||||
|
||||
namespace Easing {
|
||||
|
||||
auto linear(float t) -> float { return t; }
|
||||
|
||||
auto outQuad(float t) -> float { return 1.0F - ((1.0F - t) * (1.0F - t)); }
|
||||
auto inQuad(float t) -> float { return t * t; }
|
||||
auto inOutQuad(float t) -> float {
|
||||
return t < 0.5F
|
||||
? 2.0F * t * t
|
||||
: 1.0F - ((-2.0F * t + 2.0F) * (-2.0F * t + 2.0F) / 2.0F);
|
||||
}
|
||||
|
||||
auto outCubic(float t) -> float {
|
||||
const float INV = 1.0F - t;
|
||||
return 1.0F - (INV * INV * INV);
|
||||
}
|
||||
auto inCubic(float t) -> float { return t * t * t; }
|
||||
|
||||
auto lerp(float a, float b, float t) -> float { return a + ((b - a) * t); }
|
||||
auto lerpInt(int a, int b, float t) -> int {
|
||||
return a + static_cast<int>(static_cast<float>(b - a) * t);
|
||||
}
|
||||
|
||||
} // namespace Easing
|
||||
Reference in new issue
Block a user