forked from StrafesNET/strafe-project
Divide trait
This commit is contained in:
@ -170,6 +170,13 @@ macro_rules! impl_vector {
|
||||
#[macro_export(local_inner_macros)]
|
||||
macro_rules! impl_vector_deferred_division {
|
||||
() => {
|
||||
impl<const N:usize,T:ratio_ops::ratio::Divide<U,Output=V>,U:Copy,V> ratio_ops::ratio::Divide<U> for Vector<N,T>{
|
||||
type Output=Vector<N,V>;
|
||||
#[inline]
|
||||
fn divide(self,rhs:U)->Self::Output{
|
||||
self.map(|t|t.divide(rhs))
|
||||
}
|
||||
}
|
||||
impl<const N:usize,T,U> core::ops::Div<U> for Vector<N,T>{
|
||||
type Output=ratio_ops::ratio::Ratio<Vector<N,T>,U>;
|
||||
#[inline]
|
||||
|
Reference in New Issue
Block a user