this is not valid because we don't track the lower right entry

for rotation and translation this remains as 1, but it should change for scaling
This commit is contained in:
Corwin 2022-10-09 00:56:34 +01:00
parent 963fbc8c23
commit 002d409db8

View file

@ -269,25 +269,25 @@ impl Mul for AffineMatrix {
} }
} }
impl Mul<Num<i32, 8>> for AffineMatrix { // impl Mul<Num<i32, 8>> for AffineMatrix {
type Output = Self; // type Output = Self;
fn mul(self, rhs: Num<i32, 8>) -> Self::Output { // fn mul(self, rhs: Num<i32, 8>) -> Self::Output {
self * AffineMatrix { // self * AffineMatrix {
a: rhs, // a: rhs,
b: 0.into(), // b: 0.into(),
c: 0.into(), // c: 0.into(),
d: rhs, // d: rhs,
x: 0.into(), // x: 0.into(),
y: 0.into(), // y: 0.into(),
} // }
} // }
} // }
impl MulAssign<Num<i32, 8>> for AffineMatrix { // impl MulAssign<Num<i32, 8>> for AffineMatrix {
fn mul_assign(&mut self, rhs: Num<i32, 8>) { // fn mul_assign(&mut self, rhs: Num<i32, 8>) {
*self = *self * rhs; // *self = *self * rhs;
} // }
} // }
impl MulAssign for AffineMatrix { impl MulAssign for AffineMatrix {
fn mul_assign(&mut self, rhs: Self) { fn mul_assign(&mut self, rhs: Self) {