All pastes #361508 Raw Edit

Mine

public text v1 · immutable
·published 2007-02-18 05:09 UTC
rendered paste body
		
XY Closest; //why cant i make this an array? i change everything accordingly and i get an error
rockXY = findRGBCluster(testColors, Areas.GAME, 100);
		if (rockXY.length > 0)
		{
			Closest = new XY(0, 0);
			for (int x = 0; x < rockXY.length; x++)
			{
				if (distance(new XY(240, 185), rockXY[x]) < distance(new XY(240, 185), Closest))
				{
					log("Distance " + distance(new XY(240, 185), rockXY[x]));
					Closest = rockXY[x];
				}
				
			}
              }