diff options
author | 2020-01-06 18:44:45 +0100 | |
---|---|---|
committer | 2020-01-06 18:44:45 +0100 | |
commit | 2bbd395d5dcdf9c92ffb354b8b05444478e4b344 (patch) | |
tree | b63a6251e132b3dcd39372dd5d84eb1b3d972eff /core | |
parent | bbc8f837d72b9bc5f6a0b3125b54c246fb3b2b94 (diff) | |
download | iced-2bbd395d5dcdf9c92ffb354b8b05444478e4b344.tar.gz iced-2bbd395d5dcdf9c92ffb354b8b05444478e4b344.tar.bz2 iced-2bbd395d5dcdf9c92ffb354b8b05444478e4b344.zip |
Draft `styling` example
Diffstat (limited to 'core')
-rw-r--r-- | core/src/vector.rs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/core/src/vector.rs b/core/src/vector.rs index 1c09ee3e..75c77dbd 100644 --- a/core/src/vector.rs +++ b/core/src/vector.rs @@ -32,6 +32,17 @@ where } } +impl<T> std::ops::Mul for Vector<T> +where + T: std::ops::Mul<Output = T>, +{ + type Output = Self; + + fn mul(self, b: Self) -> Self { + Self::new(self.x * b.x, self.y * b.y) + } +} + impl<T> Default for Vector<T> where T: Default, |