aboutsummaryrefslogtreecommitdiff
path: root/evc/src/vec2.rs
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2022-12-06 21:46:19 +0100
committermetamuffin <metamuffin@disroot.org>2022-12-06 21:46:19 +0100
commit39cb075c7f58e78899be43ca9ad4d65837f53a26 (patch)
tree61f11a221ea2d60b8dc92c1af736c0fb3c9aad2d /evc/src/vec2.rs
parent437e092985e5633eee50874c337ccbdd0b76ff1e (diff)
downloadvideo-codec-experiments-39cb075c7f58e78899be43ca9ad4d65837f53a26.tar
video-codec-experiments-39cb075c7f58e78899be43ca9ad4d65837f53a26.tar.bz2
video-codec-experiments-39cb075c7f58e78899be43ca9ad4d65837f53a26.tar.zst
unsafe multithreading
Diffstat (limited to 'evc/src/vec2.rs')
-rw-r--r--evc/src/vec2.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/evc/src/vec2.rs b/evc/src/vec2.rs
index 8b01fdb..5713d02 100644
--- a/evc/src/vec2.rs
+++ b/evc/src/vec2.rs
@@ -7,6 +7,8 @@ pub struct Vec2 {
}
impl Vec2 {
pub const ZERO: Vec2 = Vec2 { x: 0, y: 0 };
+ pub const UP: Vec2 = Vec2 { x: 0, y: -1 };
+ pub const LEFT: Vec2 = Vec2 { x: -1, y: 0 };
pub fn downscale(&self, f: isize) -> Self {
Self {
x: self.x / f,