diff options
Diffstat (limited to 'src/hitbox.rs')
-rw-r--r-- | src/hitbox.rs | 5 |
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() } |