Fixed<1,_>::to_raw

This commit is contained in:
Quaternions 2024-09-16 15:47:35 -07:00
parent af1939a576
commit 980db44c9d

View File

@ -49,7 +49,7 @@ impl Time{
impl From<Planar64> for Time{
#[inline]
fn from(value:Planar64)->Self{
Time((value*Planar64::raw(1_000_000_000)).to_bits().to_bits().digits()[0] as i64)
Time(((value*Planar64::raw(1_000_000_000))>>32).fix_1().to_raw())
}
}
impl<Num,Den,N1,T1> From<Ratio<Num,Den>> for Time
@ -60,7 +60,7 @@ impl<Num,Den,N1,T1> From<Ratio<Num,Den>> for Time
{
#[inline]
fn from(value:Ratio<Num,Den>)->Self{
Time((value*Planar64::raw(1_000_000_000)).divide().fix().to_bits().to_bits().digits()[0] as i64)
Time((value*Planar64::raw(1_000_000_000)).divide().fix().to_raw())
}
}
impl std::fmt::Display for Time{