summaryrefslogtreecommitdiff
path: root/src/hitbox.rs
diff options
context:
space:
mode:
authorJustin Worthe <justin@worthe-it.co.za>2018-08-11 16:59:15 +0200
committerJustin Worthe <justin@worthe-it.co.za>2018-08-11 16:59:15 +0200
commit57f412d73a151f7a4fa35feaf249808dcbe5b5dc (patch)
tree219aebf5db4b9c621a4f5bcb86b12a8033bda353 /src/hitbox.rs
parent092eb4685e9073b046c98371ab15f85156426d15 (diff)
Clippy-suggested improvements
Diffstat (limited to 'src/hitbox.rs')
-rw-r--r--src/hitbox.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/hitbox.rs b/src/hitbox.rs
index 04de484..bd4170e 100644
--- a/src/hitbox.rs
+++ b/src/hitbox.rs
@@ -3,7 +3,10 @@ use geometry::*;
pub trait CircleHitbox {
fn pos(&self) -> Vec2d;
fn radius(&self) -> f64;
-
+
+ /**
+ * True if the point is inside the hitbox
+ */
fn touches_point(&self, point: Vec2d) -> bool {
self.pos().distance(point) <= self.radius()
}