From 934efcccaa5a82f993c13c91511afe1943caa3b4 Mon Sep 17 00:00:00 2001 From: Justin Worthe Date: Tue, 1 May 2018 11:15:14 +0200 Subject: Added escalating difficulty --- src/hitbox.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/hitbox.rs') diff --git a/src/hitbox.rs b/src/hitbox.rs index df87b68..04de484 100644 --- a/src/hitbox.rs +++ b/src/hitbox.rs @@ -9,6 +9,6 @@ pub trait CircleHitbox { } fn touches_circle(&self, other: &CircleHitbox) -> bool { - self.pos().distance(other.pos()) <= self.radius() + other.radius() + self.pos().distance_squared(other.pos()) <= (self.radius() + other.radius()).powi(2) } } -- cgit v1.2.3