From 7425f1cd0190d2a55bdb8fb773d26ce3f6769f23 Mon Sep 17 00:00:00 2001 From: Quaternions Date: Thu, 26 Sep 2024 18:04:49 -0700 Subject: [PATCH] fix tests --- src/physics.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/physics.rs b/src/physics.rs index 73fe423..d52c663 100644 --- a/src/physics.rs +++ b/src/physics.rs @@ -1979,8 +1979,8 @@ mod test{ let hitbox_mesh=h1.transformed_mesh(); let platform_mesh=h0.transformed_mesh(); let minkowski=model_physics::MinkowskiMesh::minkowski_sum(platform_mesh,hitbox_mesh); - let collision=minkowski.predict_collision_in(&relative_body,Time::MAX); - assert_eq!(collision.map(|tup|tup.1.into()),expected_collision_time,"Incorrect time of collision"); + let collision=minkowski.predict_collision_in(&relative_body,Time::from_secs(10)); + assert_eq!(collision.map(|tup|relative_body.time+tup.1.into()),expected_collision_time,"Incorrect time of collision"); } fn test_collision_rotated(relative_body:Body,expected_collision_time:Option