Skip to content

Commit

Permalink
BLUGA: Fix maths compile
Browse files Browse the repository at this point in the history
  • Loading branch information
TTENSHII committed Nov 5, 2023
1 parent 2873650 commit 8d7ab57
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion libs/B-luga-physics/include/B-luga-physics/ECSSystems.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ namespace Systems {
// Time for the complete zigzag cycle
float period = zigzagData.period;
float WavePosY =
amplitude * std::sin(2.0F * static_cast<float>(std::M_PI) * elapsedTimeInMs / period);
amplitude * std::sin(2.0F * static_cast<float>(M_PI) * elapsedTimeInMs / period);
positionComp[id].y = zigzagData.originPos.y + Maths::floatToIntConservingDecimals(WavePosY);
if (positionComp[id].y < minY) {
positionComp[id].y = minY;
Expand Down
4 changes: 2 additions & 2 deletions libs/B-luga/include/B-luga/Maths/Maths.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ class Maths {
*/
static float getAngleFromVector(const float x, const float y)
{
float angle = atan2(y, x) * 180.0F / static_cast<float>(std::M_PI);
float angle = atan2(y, x) * 180.0F / static_cast<float>(M_PI);
if (angle < 0) {
angle += 360;
}
Expand All @@ -224,6 +224,6 @@ class Maths {
*/
static float degreesToRadians(const float degrees)
{
return degrees * static_cast<float>(std::M_PI) / 180;
return degrees * static_cast<float>(M_PI) / 180;
}
};

0 comments on commit 8d7ab57

Please sign in to comment.