In my program I have an array of circles, each with an x, y, and r component. The r (radius) is 10 for all of them, and there can be anywhere between 1 and 1000 circles contained within the list.
They are all clumped around each other, such that they look like this:
My question is, what is a good way to approximate the radius of the outer circle? It does not need to be very accurate at all, and I am mostly looking for a very fast way to calculate this.
My current solution is basically this:
const outerRadius = (10 * innerCount) / 2
which is not very accurate, so I am looking for something more accurate, but ideally still O(1).
