aboutsummaryrefslogtreecommitdiff
path: root/lvc/src/impls.rs
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2023-03-08 15:43:22 +0100
committermetamuffin <metamuffin@disroot.org>2023-03-08 15:43:22 +0100
commit5b3c03bc0cfcf89e76953dde13ed58a39b5d1dd0 (patch)
treea4afcd3db0b659b959ee49b5282fd3c70f46d37f /lvc/src/impls.rs
parentb9b629a8ed9c393b1b475f67f427d26e649a6794 (diff)
downloadvideo-codec-experiments-5b3c03bc0cfcf89e76953dde13ed58a39b5d1dd0.tar
video-codec-experiments-5b3c03bc0cfcf89e76953dde13ed58a39b5d1dd0.tar.bz2
video-codec-experiments-5b3c03bc0cfcf89e76953dde13ed58a39b5d1dd0.tar.zst
do stuff, idk
Diffstat (limited to 'lvc/src/impls.rs')
-rw-r--r--lvc/src/impls.rs11
1 files changed, 11 insertions, 0 deletions
diff --git a/lvc/src/impls.rs b/lvc/src/impls.rs
index 2a5a497..04699c6 100644
--- a/lvc/src/impls.rs
+++ b/lvc/src/impls.rs
@@ -50,6 +50,17 @@ impl Add for Pixel {
}
}
}
+impl Sub for Pixel {
+ type Output = Pixel;
+ #[inline]
+ fn sub(self, rhs: Self) -> Self::Output {
+ Self {
+ r: self.r - rhs.r,
+ g: self.g - rhs.g,
+ b: self.b - rhs.b,
+ }
+ }
+}
impl P2 {
pub const ZERO: P2 = P2 { x: 0, y: 0 };
pub const X: P2 = P2 { x: 1, y: 0 };