Compare commits
1 Commits
Author | SHA1 | Date | |
---|---|---|---|
1a56128a79 |
@ -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{
|
||||
|
Loading…
Reference in New Issue
Block a user