mirror of
https://github.com/godotengine/godot.git
synced 2025-12-08 06:09:55 +00:00
Style: Convert namespaces to PascalCase
This commit is contained in:
parent
0595bb8a42
commit
1cb3cfaa8e
40 changed files with 509 additions and 509 deletions
|
|
@ -54,13 +54,13 @@
|
|||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
namespace linear {
|
||||
namespace Linear {
|
||||
static real_t in(real_t t, real_t b, real_t c, real_t d) {
|
||||
return c * t / d + b;
|
||||
}
|
||||
}; // namespace linear
|
||||
}; // namespace Linear
|
||||
|
||||
namespace sine {
|
||||
namespace Sine {
|
||||
static real_t in(real_t t, real_t b, real_t c, real_t d) {
|
||||
return -c * cos(t / d * (Math_PI / 2)) + c + b;
|
||||
}
|
||||
|
|
@ -80,9 +80,9 @@ static real_t out_in(real_t t, real_t b, real_t c, real_t d) {
|
|||
real_t h = c / 2;
|
||||
return in(t * 2 - d, b + h, h, d);
|
||||
}
|
||||
}; // namespace sine
|
||||
}; // namespace Sine
|
||||
|
||||
namespace quint {
|
||||
namespace Quint {
|
||||
static real_t in(real_t t, real_t b, real_t c, real_t d) {
|
||||
return c * pow(t / d, 5) + b;
|
||||
}
|
||||
|
|
@ -107,9 +107,9 @@ static real_t out_in(real_t t, real_t b, real_t c, real_t d) {
|
|||
real_t h = c / 2;
|
||||
return in(t * 2 - d, b + h, h, d);
|
||||
}
|
||||
}; // namespace quint
|
||||
}; // namespace Quint
|
||||
|
||||
namespace quart {
|
||||
namespace Quart {
|
||||
static real_t in(real_t t, real_t b, real_t c, real_t d) {
|
||||
return c * pow(t / d, 4) + b;
|
||||
}
|
||||
|
|
@ -134,9 +134,9 @@ static real_t out_in(real_t t, real_t b, real_t c, real_t d) {
|
|||
real_t h = c / 2;
|
||||
return in(t * 2 - d, b + h, h, d);
|
||||
}
|
||||
}; // namespace quart
|
||||
}; // namespace Quart
|
||||
|
||||
namespace quad {
|
||||
namespace Quad {
|
||||
static real_t in(real_t t, real_t b, real_t c, real_t d) {
|
||||
return c * pow(t / d, 2) + b;
|
||||
}
|
||||
|
|
@ -162,9 +162,9 @@ static real_t out_in(real_t t, real_t b, real_t c, real_t d) {
|
|||
real_t h = c / 2;
|
||||
return in(t * 2 - d, b + h, h, d);
|
||||
}
|
||||
}; // namespace quad
|
||||
}; // namespace Quad
|
||||
|
||||
namespace expo {
|
||||
namespace Expo {
|
||||
static real_t in(real_t t, real_t b, real_t c, real_t d) {
|
||||
if (t == 0) {
|
||||
return b;
|
||||
|
|
@ -203,9 +203,9 @@ static real_t out_in(real_t t, real_t b, real_t c, real_t d) {
|
|||
real_t h = c / 2;
|
||||
return in(t * 2 - d, b + h, h, d);
|
||||
}
|
||||
}; // namespace expo
|
||||
}; // namespace Expo
|
||||
|
||||
namespace elastic {
|
||||
namespace Elastic {
|
||||
static real_t in(real_t t, real_t b, real_t c, real_t d) {
|
||||
if (t == 0) {
|
||||
return b;
|
||||
|
|
@ -271,9 +271,9 @@ static real_t out_in(real_t t, real_t b, real_t c, real_t d) {
|
|||
real_t h = c / 2;
|
||||
return in(t * 2 - d, b + h, h, d);
|
||||
}
|
||||
}; // namespace elastic
|
||||
}; // namespace Elastic
|
||||
|
||||
namespace cubic {
|
||||
namespace Cubic {
|
||||
static real_t in(real_t t, real_t b, real_t c, real_t d) {
|
||||
t /= d;
|
||||
return c * t * t * t + b;
|
||||
|
|
@ -301,9 +301,9 @@ static real_t out_in(real_t t, real_t b, real_t c, real_t d) {
|
|||
real_t h = c / 2;
|
||||
return in(t * 2 - d, b + h, h, d);
|
||||
}
|
||||
}; // namespace cubic
|
||||
}; // namespace Cubic
|
||||
|
||||
namespace circ {
|
||||
namespace Circ {
|
||||
static real_t in(real_t t, real_t b, real_t c, real_t d) {
|
||||
t /= d;
|
||||
return -c * (sqrt(1 - t * t) - 1) + b;
|
||||
|
|
@ -331,9 +331,9 @@ static real_t out_in(real_t t, real_t b, real_t c, real_t d) {
|
|||
real_t h = c / 2;
|
||||
return in(t * 2 - d, b + h, h, d);
|
||||
}
|
||||
}; // namespace circ
|
||||
}; // namespace Circ
|
||||
|
||||
namespace bounce {
|
||||
namespace Bounce {
|
||||
static real_t out(real_t t, real_t b, real_t c, real_t d) {
|
||||
t /= d;
|
||||
|
||||
|
|
@ -374,9 +374,9 @@ static real_t out_in(real_t t, real_t b, real_t c, real_t d) {
|
|||
real_t h = c / 2;
|
||||
return in(t * 2 - d, b + h, h, d);
|
||||
}
|
||||
}; // namespace bounce
|
||||
}; // namespace Bounce
|
||||
|
||||
namespace back {
|
||||
namespace Back {
|
||||
static real_t in(real_t t, real_t b, real_t c, real_t d) {
|
||||
float s = 1.70158f;
|
||||
t /= d;
|
||||
|
|
@ -410,9 +410,9 @@ static real_t out_in(real_t t, real_t b, real_t c, real_t d) {
|
|||
real_t h = c / 2;
|
||||
return in(t * 2 - d, b + h, h, d);
|
||||
}
|
||||
}; // namespace back
|
||||
}; // namespace Back
|
||||
|
||||
namespace spring {
|
||||
namespace Spring {
|
||||
static real_t out(real_t t, real_t b, real_t c, real_t d) {
|
||||
t /= d;
|
||||
real_t s = 1.0 - t;
|
||||
|
|
@ -439,4 +439,4 @@ static real_t out_in(real_t t, real_t b, real_t c, real_t d) {
|
|||
real_t h = c / 2;
|
||||
return in(t * 2 - d, b + h, h, d);
|
||||
}
|
||||
}; // namespace spring
|
||||
}; // namespace Spring
|
||||
|
|
|
|||
|
|
@ -39,18 +39,18 @@
|
|||
ERR_FAIL_COND_V_MSG(started, nullptr, "Can't append to a Tween that has started. Use stop() first.");
|
||||
|
||||
Tween::interpolater Tween::interpolaters[Tween::TRANS_MAX][Tween::EASE_MAX] = {
|
||||
{ &linear::in, &linear::in, &linear::in, &linear::in }, // Linear is the same for each easing.
|
||||
{ &sine::in, &sine::out, &sine::in_out, &sine::out_in },
|
||||
{ &quint::in, &quint::out, &quint::in_out, &quint::out_in },
|
||||
{ &quart::in, &quart::out, &quart::in_out, &quart::out_in },
|
||||
{ &quad::in, &quad::out, &quad::in_out, &quad::out_in },
|
||||
{ &expo::in, &expo::out, &expo::in_out, &expo::out_in },
|
||||
{ &elastic::in, &elastic::out, &elastic::in_out, &elastic::out_in },
|
||||
{ &cubic::in, &cubic::out, &cubic::in_out, &cubic::out_in },
|
||||
{ &circ::in, &circ::out, &circ::in_out, &circ::out_in },
|
||||
{ &bounce::in, &bounce::out, &bounce::in_out, &bounce::out_in },
|
||||
{ &back::in, &back::out, &back::in_out, &back::out_in },
|
||||
{ &spring::in, &spring::out, &spring::in_out, &spring::out_in },
|
||||
{ &Linear::in, &Linear::in, &Linear::in, &Linear::in }, // Linear is the same for each easing.
|
||||
{ &Sine::in, &Sine::out, &Sine::in_out, &Sine::out_in },
|
||||
{ &Quint::in, &Quint::out, &Quint::in_out, &Quint::out_in },
|
||||
{ &Quart::in, &Quart::out, &Quart::in_out, &Quart::out_in },
|
||||
{ &Quad::in, &Quad::out, &Quad::in_out, &Quad::out_in },
|
||||
{ &Expo::in, &Expo::out, &Expo::in_out, &Expo::out_in },
|
||||
{ &Elastic::in, &Elastic::out, &Elastic::in_out, &Elastic::out_in },
|
||||
{ &Cubic::in, &Cubic::out, &Cubic::in_out, &Cubic::out_in },
|
||||
{ &Circ::in, &Circ::out, &Circ::in_out, &Circ::out_in },
|
||||
{ &Bounce::in, &Bounce::out, &Bounce::in_out, &Bounce::out_in },
|
||||
{ &Back::in, &Back::out, &Back::in_out, &Back::out_in },
|
||||
{ &Spring::in, &Spring::out, &Spring::in_out, &Spring::out_in },
|
||||
};
|
||||
|
||||
void Tweener::set_tween(const Ref<Tween> &p_tween) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue