We should clarify in which terms the circles should be nearest (Circle.distance or center.distance). Now it seems like we use the former.
Also we need to clarify what to do in case of multiple nearest pairs with equal distance (in case of Circle.distance it's quite often case since intersecting circles have zero distance). RandomTests suggest that we do not care which pair to choose but non-random tests suggest shoosing a specific pair:
val c2 = Circle(Point(3.0, 0.0), 5.0)
// ...
val c4 = Circle(Point(0.0, 7.0), 3.0)
val c5 = Circle(Point(0.0, -6.0), 4.0)
// ...
assertEquals(Pair(c2, c4), findNearestCirclePair(c2, c4, c5))
We should clarify in which terms the circles should be nearest (Circle.distance or center.distance). Now it seems like we use the former.
Also we need to clarify what to do in case of multiple nearest pairs with equal distance (in case of Circle.distance it's quite often case since intersecting circles have zero distance). RandomTests suggest that we do not care which pair to choose but non-random tests suggest shoosing a specific pair: