def fit(fit_size, options = {})
      fit_size = parse_vector(fit_size)
      require_dimensions!(fit_size)     if options[:crop]
      fit_size = size.fit(fit_size)     unless options[:crop]
      fit_size = size.contain(fit_size) unless options[:upscale]
      fit_size
    end
def fit(fit_size, options = {})
      fit_size = parse_vector(fit_size)
      require_dimensions!(fit_size)     if options[:crop]
      fit_size = size.fit(fit_size)     unless options[:crop]
      fit_size = size.contain(fit_size) unless options[:upscale]
      fit_size
    end
Adjusts +fit_size+ to fit the image dimensions.
 Any dimension set to zero will be ignored.

 ==== Options

 * <tt>:crop</tt> - Don't keep aspect ratio. This will allow
   the image to be cropped to the requested size.
 * <tt>:upscale</tt> - Don't limit to the size of the image.
   Images smaller than the given size will be scaled up.

 ==== Examples

   image = Image.find(params[:id]) # 320x200 image
   sizing = DynamicImage::ImageSizing.new(image)

   sizing.fit(Vector2d(0, 100))
   # => Vector2d(160.0, 100.0)

   sizing.fit(Vector2d(500, 500))
   # => Vector2d(320.0, 200.0)

   sizing.fit(Vector2d(500, 500), crop: true)
   # => Vector2d(200.0, 200.0)

   sizing.fit(Vector2d(500, 500), upscale: true)
   # => Vector2d(500.0, 312.5)