]> git.nega.tv - josh/narcissus/commitdiff
Fix warnings in affine2 and affine3
authorJoshua Simmons <josh@nega.tv>
Sun, 16 Oct 2022 21:42:46 +0000 (23:42 +0200)
committerJoshua Simmons <josh@nega.tv>
Sun, 16 Oct 2022 21:42:46 +0000 (23:42 +0200)
narcissus-maths/src/affine2.rs
narcissus-maths/src/affine3.rs

index 8d3cafbd2ec36b3197f7730c7703ef14258b6593..b3b6b225926887fbbf755c6f3709c67e4a2fbe13 100644 (file)
@@ -20,10 +20,10 @@ impl Affine2 {
     };
 
     pub fn mul_vec2(&self, vec: Vec2) -> Vec2 {
-        todo!()
+        self.matrix * vec + self.translate
     }
 
     pub fn mul_point2(&self, point: Point2) -> Point2 {
-        todo!()
+        self.matrix * point + self.translate
     }
 }
index eac081492e726ce946d97ddbea5ba7e3e6508fc5..b2b7c7c69fb4d47cbda1673f689ae21b0592bcf7 100644 (file)
@@ -1,4 +1,4 @@
-use crate::{Mat3, Point3, Vec2, Vec3};
+use crate::{Mat3, Point3, Vec3};
 
 /// Matrix and translation vector which together represent a 3d affine transformation.
 #[derive(Clone, Copy, PartialEq)]