diff options
author | JAROWMR <jarorutjes07@gmail.com> | 2024-12-04 20:11:02 +0100 |
---|---|---|
committer | JAROWMR <jarorutjes07@gmail.com> | 2024-12-04 20:11:02 +0100 |
commit | d76ab0bf77d0a61712dc25bbe1760995be4c4782 (patch) | |
tree | f71073322d52d6341ed46068e2c63fab8bb6f942 /src/crepe/system/PhysicsSystem.cpp | |
parent | 322e9a8ceaa8b2ce5d3e6056be4a9739817d47cf (diff) |
make format
Diffstat (limited to 'src/crepe/system/PhysicsSystem.cpp')
-rw-r--r-- | src/crepe/system/PhysicsSystem.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/crepe/system/PhysicsSystem.cpp b/src/crepe/system/PhysicsSystem.cpp index b5da042..b3adfa1 100644 --- a/src/crepe/system/PhysicsSystem.cpp +++ b/src/crepe/system/PhysicsSystem.cpp @@ -32,10 +32,13 @@ void PhysicsSystem::update() { } // Add damping if (rigidbody.data.angular_velocity_coefficient > 0) { - rigidbody.data.angular_velocity *= rigidbody.data.angular_velocity_coefficient; + rigidbody.data.angular_velocity + *= rigidbody.data.angular_velocity_coefficient; } - if (rigidbody.data.linear_velocity_coefficient.x > 0 && rigidbody.data.linear_velocity_coefficient.y > 0) { - rigidbody.data.linear_velocity *= rigidbody.data.linear_velocity_coefficient; + if (rigidbody.data.linear_velocity_coefficient.x > 0 + && rigidbody.data.linear_velocity_coefficient.y > 0) { + rigidbody.data.linear_velocity + *= rigidbody.data.linear_velocity_coefficient; } // Max velocity check |