Compare commits

...

1 Commits

Author SHA1 Message Date
1a56128a79 conflicting 2024-08-29 15:50:44 -07:00

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{