Sha256: c520caa3660ae8b0be3cb1a78536ccbe4eba2a75b8a825bffec003d4f974e751
Contents?: true
Size: 334 Bytes
Versions: 5
Compression:
Stored size: 334 Bytes
Contents
$LOAD_PATH.unshift File.expand_path('../../lib', __FILE__) require 'palette' require 'test/unit' module TestHelper def assert_near(c1, c2, eps=1e-8) assert_equal(c1.class, c2.class) c1.components.zip(c2.components).each do |x1, x2| x1, x2 = [x1, x2].map(&:to_f) assert { (x1 - x2).abs < eps } end end end
Version data entries
5 entries across 5 versions & 1 rubygems
Version | Path |
---|---|
red-palette-0.5.0 | test/helper.rb |
red-palette-0.4.0 | test/helper.rb |
red-palette-0.3.0 | test/helper.rb |
red-palette-0.2.0 | test/helper.rb |
red-palette-0.1.0 | test/helper.rb |