Sha256: 9bcfeedbb3ab1f46410519e57475007d2f60d70c836854e1c916a7114508759c

Contents?: true

Size: 336 Bytes

Versions: 2

Compression:

Stored size: 336 Bytes

Contents

require 'test/unit'

require 'eymiha/math/approximately_equals'

class TC_approximately_equals < Test::Unit::TestCase

  def test_approximately_equals
    assert(!(1 =~ 1.001))
    assert(1 =~ 1.000000000000001)
    assert(1.approximately_equals?(1.001,0.01))
    Numeric.epsilon = 0.01
    assert(1 =~ 1.001)
  end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
eymiha_math-1.0.1 test/tc_approximately_equals.rb
eymiha_math-1.0.0 test/tc_approximately_equals.rb