Sha256: 210a133dbd64a35f91a24c74f6f949c5e67815cff4459c6589c750ce30fd2b9f

Contents?: true

Size: 400 Bytes

Versions: 1

Compression:

Stored size: 400 Bytes

Contents

require "spec_helper"

module Photomosaic
  module Color
    describe HSV do
      describe "#calculate_distance" do
        it "should calculate color distance" do
          color_a = described_class.new(100, 50.0, 70.0)
          color_b = described_class.new(50, 30.0, 50.0)

          expect(color_a.calculate_distance(color_b)).to be_within(0.1).of(57.4)
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
photomosaic-0.0.1 spec/photomosaic/color/hsv_spec.rb