From 23d6c2d3b56145999c14596733853bc6de49eff3 Mon Sep 17 00:00:00 2001 From: metamuffin Date: Fri, 30 Dec 2022 19:25:28 +0100 Subject: fixed: linear transform, value scale and command line ars --- evc/src/helpers/vector.rs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'evc/src/helpers/vector.rs') diff --git a/evc/src/helpers/vector.rs b/evc/src/helpers/vector.rs index 0209c58..a4766d1 100644 --- a/evc/src/helpers/vector.rs +++ b/evc/src/helpers/vector.rs @@ -20,6 +20,14 @@ impl From> for Vec2 { } } } +impl From> for Vec2 { + fn from(value: Vec2) -> Self { + Self { + x: value.x as isize, + y: value.y as isize, + } + } +} impl Vec2 { pub const ZERO: Vec2 = Vec2 { x: 0, y: 0 }; @@ -58,7 +66,7 @@ impl Vec2 { Self { x: self.x, y: 0 } } pub fn y_only(&self) -> Self { - Self { x: self.x, y: 0 } + Self { x: 0, y: self.y } } } -- cgit v1.2.3-70-g09d2