/// <summary> /// Detects collisions between two bounding circles /// </summary> /// <param name="a">one circle</param> /// <param name="b">the second circle</param> /// <returns>a bool representing if the circles collided</returns> public static bool Collides(BoundingCircle a, BoundingCircle b) { return(Math.Pow(a.Radius + b.Radius, 2) >= Math.Pow(a.Center.X - b.Center.X, 2) + Math.Pow(a.Center.Y - b.Center.Y, 2)); }
public bool CollidesWith(BoundingCircle other) { return(CollisionHelper.Collides(this, other)); }