private boolean collides(int x, int y) { /* * If this connection is between two neurons within the * same unexpanded cluster. */ if (source.cluster == destination.cluster && !source.cluster.expanded) return false; int connectionX = (source.getX() + destination.getX()) / 2; int connectionY = (source.getX() + destination.getX()) / 2; if (NumTools.distance(x, y, connectionX, connectionY) > 6) return false; return true; }
private boolean collides(int x, int y) { if (!cluster.expanded || NumTools.distance(x, y, this.x, this.y) > 8) return false; return true; }