Can anyone help me create functions for doing this
1) three bool methods onCircle (Point *), outofCircle (Point *), and inCircle (Point *) for a Circle object C (so C->onCircle (P) for a point P means the point P lies on the circle C (i.e. the distance of P to the center of C is equal to the radius of C).
2) three bool method intersect (Circle *), tangent (Circle *), and disjoint (Circle *) to check if two circles intersect (in two points), are tangent (intersect in exactly one point), or are disjoint (do not intersect). For example, if we have Circle *C1, *C2; and Point *P; then C->inCircle (P) is true means point P is in the circle C; C1->intersect (C2) is true means circle C1 and C2 intersect.
3) Provide test cases for points on, inside, and outside a circle. Also provide cases for circles intersecting, tangent, and disjoint.
Two circles intersect if the sum of their radii is larger than the distance between the two centers
Two circles are tangent if the sum of their radii is equal to the distance between the two centers
Two circles are disjoint if the sum of their radii is less than the distance between the two centers
Edited 6 Years Ago by Anocondo: n/a