Fix multiplication of non-square DMats.

Matrices were in wrong order.
This commit is contained in:
Arttu Ylä-Outinen 2015-07-12 09:44:03 +03:00
parent 8b14cef4e7
commit 75208896a3

View File

@ -285,11 +285,11 @@ impl<'a, N: Copy + Mul<N, Output = N> + Add<N, Output = N> + Zero> Mul<DMat<N>>
#[inline] #[inline]
fn mul(self, right: DMat<N>) -> DMat<N> { fn mul(self, right: DMat<N>) -> DMat<N> {
right * self self * (&right)
} }
} }
impl<'a, N: Copy + Mul<N, Output = N> + Add<N, Output = N> + Zero> Mul<&'a DMat<N>> for &'a DMat<N> { impl<'a, 'b, N: Copy + Mul<N, Output = N> + Add<N, Output = N> + Zero> Mul<&'b DMat<N>> for &'a DMat<N> {
type Output = DMat<N>; type Output = DMat<N>;
#[inline] #[inline]