I have an array of a Unit object, and a single object has a center cx, cy and radius cr. I want only the outlines of the circles to be displayed (think of a diagram in Vienna without overlapping bits). I managed to do this, but this makes it very slow, as it is a nested loop. Here is the code:
(all this in a method that cycles through all units)
ArrayList<Integer> validangles = new ArrayList<Integer>(); public void getValidAngles(ArrayList<Unit> units) {
The problem is that if I have a couple of hundred units that will be distributed, this will slow down the program per ton due to the fact that the nested blocks are in another trap of units.
source share