From 72c91558e7bce056bfe07c598beaf5a7ccfb7d64 Mon Sep 17 00:00:00 2001 From: Quaternions Date: Thu, 26 Sep 2024 18:43:11 -0700 Subject: [PATCH] use one type def for dt ratio --- src/face_crawler.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/face_crawler.rs b/src/face_crawler.rs index 5cdc1e1..9faf38a 100644 --- a/src/face_crawler.rs +++ b/src/face_crawler.rs @@ -1,18 +1,18 @@ use crate::physics::Body; -use crate::model_physics::{FEV,MeshQuery,DirectedEdge,MinkowskiMesh,MinkowskiFace,MinkowskiDirectedEdge,MinkowskiVert}; +use crate::model_physics::{GigaTime,FEV,MeshQuery,DirectedEdge,MinkowskiMesh,MinkowskiFace,MinkowskiDirectedEdge,MinkowskiVert}; use strafesnet_common::integer::{Time,Fixed,Ratio}; #[derive(Debug)] enum Transition{ Miss, - Next(FEV,Ratio,Fixed<4,128>>), - Hit(F,Ratio,Fixed<4,128>>), + Next(FEV,GigaTime), + Hit(F,GigaTime), } type MinkowskiFEV=FEV; type MinkowskiTransition=Transition; - fn next_transition(fev:&MinkowskiFEV,body_time:Ratio,Fixed<4,128>>,mesh:&MinkowskiMesh,body:&Body,mut best_time:Ratio,Fixed<4,128>>)->MinkowskiTransition{ + fn next_transition(fev:&MinkowskiFEV,body_time:GigaTime,mesh:&MinkowskiMesh,body:&Body,mut best_time:GigaTime)->MinkowskiTransition{ //conflicting derivative means it crosses in the wrong direction. //if the transition time is equal to an already tested transition, do not replace the current best. let mut best_transtition=MinkowskiTransition::Miss; @@ -102,7 +102,7 @@ type MinkowskiTransition=Transition{ Miss(FEV), - Hit(F,Ratio,Fixed<4,128>>), + Hit(F,GigaTime), } type MinkowskiCrawlResult=CrawlResult; pub fn crawl_fev(mut fev:MinkowskiFEV,mesh:&MinkowskiMesh,relative_body:&Body,start_time:Time,time_limit:Time)->MinkowskiCrawlResult{