summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2020-01-06 18:44:45 +0100
committerLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2020-01-06 18:44:45 +0100
commit2bbd395d5dcdf9c92ffb354b8b05444478e4b344 (patch)
treeb63a6251e132b3dcd39372dd5d84eb1b3d972eff /core
parentbbc8f837d72b9bc5f6a0b3125b54c246fb3b2b94 (diff)
downloadiced-2bbd395d5dcdf9c92ffb354b8b05444478e4b344.tar.gz
iced-2bbd395d5dcdf9c92ffb354b8b05444478e4b344.tar.bz2
iced-2bbd395d5dcdf9c92ffb354b8b05444478e4b344.zip
Draft `styling` example
Diffstat (limited to 'core')
-rw-r--r--core/src/vector.rs11
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,