Sha256: b31d62614a8efc05d5459c9bf2341224eaba6b19fdba8392442eeb89b19dd39b
Contents?: true
Size: 333 Bytes
Versions: 7
Compression:
Stored size: 333 Bytes
Contents
$LOAD_PATH.unshift File.expand_path('../../lib', __FILE__) require 'colors' 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
7 entries across 7 versions & 1 rubygems