From 64b60939637da53422948417da5f026888c3d9ae Mon Sep 17 00:00:00 2001 From: JAROWMR Date: Thu, 12 Dec 2024 18:06:24 +0100 Subject: updated test values --- src/test/PhysicsTest.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src') 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); } -- cgit v1.2.3