圆的碰撞检测_ci

bool CollisionBetweenCircles(circle c1,circle c2)
{
bool hit;
float distanceOfCenter=sqrt(pow((c1.center.x-c2.center.x),2)+
pow((c1.center.y-c2.center.y),2));
float distanceOfRadius=c1.radius+c2.radius;
if(distanceOfCenter<=distanceOfRadius)
{
hit=true;
}
else
{
hit=false;
}
return hit;
}