Draft styling example

This commit is contained in:
Héctor Ramón Jiménez 2020-01-06 18:44:45 +01:00
parent bbc8f837d7
commit 2bbd395d5d
5 changed files with 298 additions and 6 deletions

View file

@ -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,