common: integer: Time <-> Ratio
This commit is contained in:
parent
62851bbd60
commit
7c0ad5b601
@ -63,6 +63,12 @@ impl<T> From<Planar64> for Time<T>{
|
|||||||
Self::raw((value*Planar64::raw(1_000_000_000)).fix_1().to_raw())
|
Self::raw((value*Planar64::raw(1_000_000_000)).fix_1().to_raw())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
impl<T> From<Time<T>> for Ratio<Planar64,Planar64>{
|
||||||
|
#[inline]
|
||||||
|
fn from(value:Time<T>)->Self{
|
||||||
|
value.to_ratio()
|
||||||
|
}
|
||||||
|
}
|
||||||
impl<T,Num,Den,N1,T1> From<Ratio<Num,Den>> for Time<T>
|
impl<T,Num,Den,N1,T1> From<Ratio<Num,Den>> for Time<T>
|
||||||
where
|
where
|
||||||
Num:core::ops::Mul<Planar64,Output=N1>,
|
Num:core::ops::Mul<Planar64,Output=N1>,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user