summaryrefslogtreecommitdiffstats
path: root/core/src
diff options
context:
space:
mode:
Diffstat (limited to 'core/src')
-rw-r--r--core/src/vector.rs12
1 files changed, 12 insertions, 0 deletions
diff --git a/core/src/vector.rs b/core/src/vector.rs
index 7d87343a..1c09ee3e 100644
--- a/core/src/vector.rs
+++ b/core/src/vector.rs
@@ -31,3 +31,15 @@ where
Self::new(self.x + b.x, self.y + b.y)
}
}
+
+impl<T> Default for Vector<T>
+where
+ T: Default,
+{
+ fn default() -> Self {
+ Self {
+ x: T::default(),
+ y: T::default(),
+ }
+ }
+}