Fixed<1,_>::to_raw
This commit is contained in:
parent
af1939a576
commit
980db44c9d
@ -49,7 +49,7 @@ impl Time{
|
|||||||
impl From<Planar64> for Time{
|
impl From<Planar64> for Time{
|
||||||
#[inline]
|
#[inline]
|
||||||
fn from(value:Planar64)->Self{
|
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
|
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]
|
#[inline]
|
||||||
fn from(value:Ratio<Num,Den>)->Self{
|
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{
|
impl std::fmt::Display for Time{
|
||||||
|
Loading…
Reference in New Issue
Block a user