Skip to content

Commit

Permalink
refactor(physics): improve force and impulse components code readability
Browse files Browse the repository at this point in the history
  • Loading branch information
fallenatlas committed Jan 22, 2024
1 parent 0f4b703 commit 948d9e9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
5 changes: 2 additions & 3 deletions engine/include/cubos/engine/physics/components/force.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,9 @@ namespace cubos::engine
/// @ingroup physics-plugin
struct Force
{
public:
CUBOS_REFLECT;

const glm::vec3 getForce() const
glm::vec3 getForce() const
{
return mForce;
}
Expand All @@ -30,7 +29,7 @@ namespace cubos::engine

void clearForce()
{
mForce = {0.0f, 0.0f, 0.0f};
mForce = {0.0F, 0.0F, 0.0F};
}

private:
Expand Down
5 changes: 2 additions & 3 deletions engine/include/cubos/engine/physics/components/impulse.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,9 @@ namespace cubos::engine
/// @ingroup physics-plugin
struct Impulse
{
public:
CUBOS_REFLECT;

const glm::vec3 getImpulse() const
glm::vec3 getImpulse() const
{
return mImpulse;
}
Expand All @@ -30,7 +29,7 @@ namespace cubos::engine

void clearImpulse()
{
mImpulse = {0.0f, 0.0f, 0.0f};
mImpulse = {0.0F, 0.0F, 0.0F};
}

private:
Expand Down

0 comments on commit 948d9e9

Please sign in to comment.