From 306f96164784a8cbf405e72fa4364d6523366e95 Mon Sep 17 00:00:00 2001 From: metamuffin Date: Mon, 5 May 2025 15:09:54 +0200 Subject: old dir --- evc/src/helpers/matrix.rs | 33 --------------------------------- 1 file changed, 33 deletions(-) delete mode 100644 evc/src/helpers/matrix.rs (limited to 'evc/src/helpers/matrix.rs') diff --git a/evc/src/helpers/matrix.rs b/evc/src/helpers/matrix.rs deleted file mode 100644 index 0007440..0000000 --- a/evc/src/helpers/matrix.rs +++ /dev/null @@ -1,33 +0,0 @@ -use crate::helpers::vector::Vec2; - -#[derive(Debug, Clone, Copy, PartialEq)] -pub struct Mat2 { - pub a: T, - pub b: T, - pub c: T, - pub d: T, -} - -impl + std::ops::Add + Copy> Mat2 { - #[inline] - pub fn transform(&self, v: Vec2) -> Vec2 { - Vec2 { - x: self.a * v.x + self.b * v.y, - y: self.c * v.x + self.d * v.y, - } - } -} - -impl + std::ops::Add + Copy> std::ops::Mul for Mat2 { - type Output = Mat2; - #[inline] - fn mul(self, rhs: Mat2) -> Mat2 { - let (x, y) = (self, rhs); - Mat2 { - a: x.a * y.a + x.b * y.c, - b: x.a * y.b + x.b * y.d, - c: x.c * y.a + x.d * y.c, - d: x.c * y.b + x.d * y.d, - } - } -} -- cgit v1.2.3-70-g09d2