conflicting

This commit is contained in:
Quaternions 2024-08-29 15:50:44 -07:00
parent 6335b1da47
commit 1a56128a79

View File

@ -86,6 +86,21 @@ macro_rules! impl_operator {
} }
} }
} }
impl<Num,Den,Lhs> core::ops::$trait<$struct<Num,Den>> for Lhs
where
Den:Copy,
Lhs:Mul<Den>,
<Lhs as Mul<Den>>::Output:core::ops::$trait<Num>,
{
type Output=$struct<<<Lhs as Mul<Den>>::Output as core::ops::$trait<Num>>::Output,Den>;
fn $method(self,rhs:$struct<Num,Den>)->Self::Output{
$struct{
num:self.mul(rhs.den).$method(rhs.num),
den:rhs.den,
}
}
}
}; };
} }
macro_rules! impl_assign_operator{ macro_rules! impl_assign_operator{