aboutsummaryrefslogtreecommitdiff
path: root/evc/src/helpers/vector.rs
diff options
context:
space:
mode:
Diffstat (limited to 'evc/src/helpers/vector.rs')
-rw-r--r--evc/src/helpers/vector.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/evc/src/helpers/vector.rs b/evc/src/helpers/vector.rs
index f411832..7cb180a 100644
--- a/evc/src/helpers/vector.rs
+++ b/evc/src/helpers/vector.rs
@@ -31,6 +31,9 @@ impl<T: std::ops::Mul<Output = T> + Copy> Vec2<T> {
y: self.y * f,
}
}
+ pub fn area(&self) -> T {
+ self.x * self.y
+ }
}
impl Vec2<isize> {