From 2ac18802b58d671c10538e78d50a620baad9a188 Mon Sep 17 00:00:00 2001 From: metamuffin Date: Wed, 7 Dec 2022 21:23:42 +0100 Subject: advanced transform --- evc/src/helpers/matrix.rs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'evc/src/helpers/matrix.rs') diff --git a/evc/src/helpers/matrix.rs b/evc/src/helpers/matrix.rs index 92f46b2..87c0e7d 100644 --- a/evc/src/helpers/matrix.rs +++ b/evc/src/helpers/matrix.rs @@ -9,6 +9,7 @@ pub struct Mat2 { } impl + std::ops::Add + Copy> Mat2 { + #[inline] pub fn transform(&self, v: Vec2) -> Vec2 { Vec2 { x: self.a * v.x + self.b * v.x, @@ -19,6 +20,7 @@ impl + std::ops::Add + Copy> Mat2 { 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 { -- cgit v1.2.3-70-g09d2