delta = (int) Math.sqrt(length * length / 2); x2 = x1 - delta; y2 = y1 + delta;
x2 = x1 - length.diagLength; y2 = y1 + length.diagLength;
    public void setLength(double length) {	int delta;	switch (getDirection()) {	    case CompassPoints.NORTH:		y2 = y1 - (int) length;		break;	    case CompassPoints.NORTHEAST:		delta = (int) Math.sqrt(length * length / 2);		x2 = x1 + delta;		y2 = y1 - delta;		break;	    case CompassPoints.EAST:		x2 = x1 + (int) length;		break;	    case CompassPoints.SOUTHEAST:		delta = (int) Math.sqrt(length * length / 2);		x2 = x1 + delta;		y2 = y1 + delta;		break;	    case CompassPoints.SOUTH:		y2 = y1 + (int) length;		break;	    case CompassPoints.SOUTHWEST:		delta = (int) Math.sqrt(length * length / 2);		x2 = x1 - delta;		y2 = y1 + delta;		break;	    case CompassPoints.WEST:		x2 = x1 - (int) length;		break;	    case CompassPoints.NORTHWEST:		delta = (int) Math.sqrt(length * length / 2);		x2 = x1 - delta;		y2 = y1 - delta;		break;	}    }