From 78b436741ca0d75149d35abd94172052667177d9 Mon Sep 17 00:00:00 2001 From: Quaternions Date: Thu, 30 Nov 2023 18:53:19 -0800 Subject: [PATCH] more test --- src/physics.rs | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/src/physics.rs b/src/physics.rs index 8105e2e..d27a4b7 100644 --- a/src/physics.rs +++ b/src/physics.rs @@ -1864,6 +1864,42 @@ fn test_collision_oblique(){ ),Some(Time::from_secs(2))); } #[test] +fn test_collision_oblique_north(){ + test_collision(Body::new( + Planar64Vec3::int(0,4,0), + Planar64Vec3::int(0,-1,-1), + Planar64Vec3::int(0,-1,0), + Time::ZERO + ),Some(Time::from_nanos(732050807))); +} +#[test] +fn test_collision_oblique_east(){ + test_collision(Body::new( + Planar64Vec3::int(0,4,0), + Planar64Vec3::int(1,-1,0), + Planar64Vec3::int(0,-1,0), + Time::ZERO + ),Some(Time::from_nanos(732050807))); +} +#[test] +fn test_collision_oblique_south(){ + test_collision(Body::new( + Planar64Vec3::int(0,4,0), + Planar64Vec3::int(0,-1,1), + Planar64Vec3::int(0,-1,0), + Time::ZERO + ),Some(Time::from_nanos(732050807))); +} +#[test] +fn test_collision_oblique_west(){ + test_collision(Body::new( + Planar64Vec3::int(0,4,0), + Planar64Vec3::int(-1,-1,0), + Planar64Vec3::int(0,-1,0), + Time::ZERO + ),Some(Time::from_nanos(732050807))); +} +#[test] fn zoom_hit_nothing(){ test_collision(Body::new( Planar64Vec3::int(0,10,0),