aboutsummaryrefslogtreecommitdiff
path: root/evc/src/helpers/matrix.rs
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2022-12-07 21:23:42 +0100
committermetamuffin <metamuffin@disroot.org>2022-12-07 21:23:42 +0100
commit2ac18802b58d671c10538e78d50a620baad9a188 (patch)
tree17f924039fd8f3dae2801902d4bdeaac8ea74624 /evc/src/helpers/matrix.rs
parent9d7986bbfd44b69a623fa29528b5d13000b91c77 (diff)
downloadvideo-codec-experiments-2ac18802b58d671c10538e78d50a620baad9a188.tar
video-codec-experiments-2ac18802b58d671c10538e78d50a620baad9a188.tar.bz2
video-codec-experiments-2ac18802b58d671c10538e78d50a620baad9a188.tar.zst
advanced transform
Diffstat (limited to 'evc/src/helpers/matrix.rs')
-rw-r--r--evc/src/helpers/matrix.rs2
1 files changed, 2 insertions, 0 deletions
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<T> {
}
impl<T: std::ops::Mul<Output = T> + std::ops::Add<Output = T> + Copy> Mat2<T> {
+ #[inline]
pub fn transform(&self, v: Vec2<T>) -> Vec2<T> {
Vec2 {
x: self.a * v.x + self.b * v.x,
@@ -19,6 +20,7 @@ impl<T: std::ops::Mul<Output = T> + std::ops::Add<Output = T> + Copy> Mat2<T> {
impl<T: std::ops::Mul<Output = T> + std::ops::Add<Output = T> + Copy> std::ops::Mul for Mat2<T> {
type Output = Mat2<T>;
+ #[inline]
fn mul(self, rhs: Mat2<T>) -> Mat2<T> {
let (x, y) = (self, rhs);
Mat2 {