Mine
public text v1 · immutable
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];
}
}
}