circle1.intersects(circle2) returns true when actually contained

Create issue
Issue #15 new
Bart Toersche created an issue

When intersecting two shapes, like for example, two Rectangles. The intersect method will return true only if their boundary (lines) overlap. When one Rectangle contains the other, the intersect method returns false like expected. However, when intersecting 2 Circle objects, the intersect method will return true when the circles are touching one another (like expected) but will also return true when one circle contains the other (in which case it should return false).

Furthermore, for this reason the circle1.contains(circle2) method will always return false. Since the contains method first checks whether the shapes are intersecting one another, and if not, it checks whether a point of the circle is contained within the other circle (correct me if I'm wrong). So, since the intersect method doesn't work properly, the contains method will fail as well.

Comments (1)

  1. Dalle Balle

    I am having the same problem with contains with target and argument like rectangle.contains(rectangle). Always returns false.

    Also, intersecting two rectangles gives me true when target rectangle contains or intersects the rectangle parameter.

  2. Log in to comment