From 10a293e789598bbcddfce5694d54bb2ccd7a43ec Mon Sep 17 00:00:00 2001 From: Quaternions Date: Thu, 12 Oct 2023 15:51:31 -0700 Subject: [PATCH] wip --- src/integer.rs | 90 +++++++++++++++++++++++++++++++--- src/physics.rs | 130 +++++++++++++++++++++++++------------------------ 2 files changed, 148 insertions(+), 72 deletions(-) diff --git a/src/integer.rs b/src/integer.rs index d435753..191ede0 100644 --- a/src/integer.rs +++ b/src/integer.rs @@ -24,6 +24,11 @@ impl Time{ self.0 } } +impl From for Time{ + fn from(value:Planar64)->Self{ + Time((((value.0 as i128)*1_000_000_000)>>32) as i64) + } +} impl std::fmt::Display for Time{ fn fmt(&self,f:&mut std::fmt::Formatter<'_>)->std::fmt::Result{ write!(f,"{}s+{}ns",self.0/Self::ONE_SECOND.0,self.0%Self::ONE_SECOND.0) @@ -50,6 +55,20 @@ impl std::ops::Sub