fix: change from M_PI to PI

This commit is contained in:
2021-09-12 17:17:44 +02:00
parent f5e95b2d56
commit e0c7001112
2 changed files with 8 additions and 6 deletions

View File

@@ -8,15 +8,15 @@ namespace utils{
/* Sine functions */
float easeInSine(float x){
return 1.0f - std::cos((x * M_PI) / 2.0f);
return 1.0f - std::cos((x * PI) / 2.0f);
}
float easeOutSine(float x){
return std::sin((x * M_PI) / 2.0f);
return std::sin((x * PI) / 2.0f);
}
float easeInOutSine(float x){
return -(std::cos(M_PI * x) - 1.0f) / 2.0f;
return -(std::cos(PI * x) - 1.0f) / 2.0f;
}
/* Cubic functions */
@@ -66,7 +66,7 @@ float easeInOutCirc(float x){
/* Elastic functions */
float easeInElastic(float x){
const float c4 = (2 * M_PI) / 3.0f;
const float c4 = (2 * PI) / 3.0f;
return x == 0
? 0
@@ -76,7 +76,7 @@ float easeInElastic(float x){
}
float easeOutElastic(float x){
const float c4 = (2 * M_PI) / 3.0f;
const float c4 = (2 * PI) / 3.0f;
return x == 0
? 0
@@ -86,7 +86,7 @@ float easeOutElastic(float x){
}
float easeInOutElastic(float x){
const float c5 = (2 * M_PI) / 4.5;
const float c5 = (2 * PI) / 4.5;
return x == 0
? 0