diff options
author | JAROWMR <jarorutjes07@gmail.com> | 2024-12-12 18:06:24 +0100 |
---|---|---|
committer | JAROWMR <jarorutjes07@gmail.com> | 2024-12-12 18:06:24 +0100 |
commit | 64b60939637da53422948417da5f026888c3d9ae (patch) | |
tree | 69c01bfa7415de136d9ccbbe1ca6c28a3d5b3cba /src | |
parent | f1650941336db0b1b5152dc900022e99853770ed (diff) |
updated test values
Diffstat (limited to 'src')
-rw-r--r-- | src/test/PhysicsTest.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/test/PhysicsTest.cpp b/src/test/PhysicsTest.cpp index c04e3ff..3afb3c7 100644 --- a/src/test/PhysicsTest.cpp +++ b/src/test/PhysicsTest.cpp @@ -108,7 +108,7 @@ TEST_F(PhysicsTest, movement) { EXPECT_NEAR(transform.position.x, 0.02, 0.001); EXPECT_NEAR(transform.position.y, 0.02, 0.001); EXPECT_NEAR(transform.rotation, 0.02, 0.001); - + rigidbody.data.constraints = {0, 0, 0}; rigidbody.data.linear_velocity_coefficient.x = 0.5; rigidbody.data.linear_velocity_coefficient.y = 0.5; rigidbody.data.angular_velocity_coefficient = 0.5; @@ -122,9 +122,11 @@ TEST_F(PhysicsTest, movement) { rigidbody.data.max_angular_velocity = 1000; rigidbody.data.angular_velocity = 360; system.update(); - EXPECT_NEAR(transform.rotation, 7.22, 0.0001); + EXPECT_NEAR(transform.rotation, 7.24, 0.01); rigidbody.data.angular_velocity = -360; system.update(); - EXPECT_NEAR(transform.rotation, 0.02, 0.001); + EXPECT_NEAR(transform.rotation, 0.04, 0.001); + system.update(); + EXPECT_NEAR(transform.rotation, 352.84, 0.01); } |