public static boolean isValidDimension(double width, double height) {
		if (width < 0 || height < 0)
			return false;
		if (width > Double.MAX_VALUE || height > Double.MAX_VALUE)
			return false;
		if(Double.isNaN(width) || Double.isNaN(height))
			return false;
		return true;
	}