Well, if you want to detect collision between two
balls then the condition should be (subject to Sergey's approval :-D).
(XC0-XC1)*(XC0-XC1)+(YC0-YC1)*(YC0-YC1) <= R1*R1+R2*R2+2*R1*R2
That is distance between the two centers is less than (or equal) to sum of their radii