From e2bd9ba692188e9c2d3bee5a9dd740751e3b34e3 Mon Sep 17 00:00:00 2001 From: Quaternions Date: Mon, 30 Sep 2024 21:09:34 -0700 Subject: [PATCH] maybe multiply smaller den faster (this operation sucks) --- src/model_physics.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/model_physics.rs b/src/model_physics.rs index 243c4733..5789b9aa 100644 --- a/src/model_physics.rs +++ b/src/model_physics.rs @@ -757,7 +757,7 @@ impl MinkowskiMesh<'_>{ //WARNING! d outside of *2 //WARNING: truncated precision for dt in Fixed::<4,128>::zeroes2(((n.dot(relative_body.position))*2-d).fix_4(),n.dot(relative_body.velocity).fix_4()*2,n.dot(relative_body.acceleration).fix_4()){ - if Ratio::new(Planar64::ZERO,Planar64::ONE).le_ratio(dt)&&dt.lt_ratio(best_time)&&n.dot(relative_body.extrapolated_velocity_ratio_dt(dt)).is_negative(){ + if Ratio::new(Planar64::ZERO,Planar64::EPSILON).le_ratio(dt)&&dt.lt_ratio(best_time)&&n.dot(relative_body.extrapolated_velocity_ratio_dt(dt)).is_negative(){ best_time=dt; best_edge=Some(directed_edge_id); break;