Implements division and remainder operators for vectors.
This might have been an oversight at one point. Although the `rem_v` and `div_v` methods are available for vectors, the actual operators were not. Signed-off-by: Aaron Jacobs <atheriel@gmail.com>
This commit is contained in:
parent
ed5bb32f0b
commit
7e81b258a9
1 changed files with 8 additions and 0 deletions
|
@ -203,6 +203,14 @@ macro_rules! vec(
|
|||
#[inline] fn mul(&self, v: &$Self<S>) -> $Self<S> { self.mul_v(v) }
|
||||
}
|
||||
|
||||
impl<S: BaseNum> Div<$Self<S>, $Self<S>> for $Self<S> {
|
||||
#[inline] fn div(&self, v: &$Self<S>) -> $Self<S> { self.div_v(v) }
|
||||
}
|
||||
|
||||
impl<S: BaseNum> Rem<$Self<S>, $Self<S>> for $Self<S> {
|
||||
#[inline] fn rem(&self, v: &$Self<S>) -> $Self<S> { self.rem_v(v) }
|
||||
}
|
||||
|
||||
impl<S: BaseNum> One for $Self<S> {
|
||||
#[inline] fn one() -> $Self<S> { $Self::from_value(one()) }
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue