Possible Duplicate:
Finding if a circle is inside another circle
How can I determine if a circle completely contains another circle (in Java)
public class Circle {
//x and y define the top left rectangular region bounding this circle
private int x, y, radius;
}
public boolean circleContainsCircle(Circle big, Circle small) {
...
}
The largest segment that cuts the two circles and touches their surfaces is the one that passes through their centres. Now we can say that, if length of this longest segment is less or equal to diameter of largest circle then the smaller circle is obviously lie within the big circle: