diff --git a/agb/src/number.rs b/agb/src/number.rs index f046e79d..0032d43e 100644 --- a/agb/src/number.rs +++ b/agb/src/number.rs @@ -720,6 +720,18 @@ impl Vector2D { pub fn get(self) -> (T, T) { (self.x, self.y) } + pub fn hadamard(self, other: Self) -> Self { + Self { + x: self.x * other.x, + y: self.y * other.y, + } + } + pub fn swap(self) -> Self { + Self { + x: self.y, + y: self.x, + } + } } #[test_case]