Sha256: 15ea5e429920f3f6e9549ee5ff6361b2c68d646cc85a5cdfbb3835260e61d4fc

Contents?: true

Size: 232 Bytes

Versions: 2

Compression:

Stored size: 232 Bytes

Contents

#! /usr/bin/env ruby
# coding: utf-8

class Float
  # return true if absolute value of the difference
  # between self and other is smaller than delta.
  def equal_in_delta?(other, delta)
    (self - other).abs < delta
  end

end


Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
builtinextension-0.1.4 lib/float/equalindelta.rb
builtinextension-0.1.3 lib/float/equalindelta.rb