ukerandi
asked on
Algorithm
Any one can guide me how to do that?
Design a Circle class and write a function to determine if 2 circles intersect
Design a Circle class and write a function to determine if 2 circles intersect
Your circle class should contain methods or members that determine the x-y location of the centers and the radii. Two circles intersect if the distance between their centers is smaller than or equal to the sum of their radii but also larger than or equal to the smaller circle's radius.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Good, Anarki, it's harder than I thought. Should have googled for an answer instead of thinking I knew it.
In most tasks, I think, the first condition you gave is 100% correct.
So your answer is good!
So your answer is good!
> Should have googled for an answer instead of thinking I knew it.
No. Then you hadn't learned anything. You did it right.
/gustav
No. Then you hadn't learned anything. You did it right.
/gustav