Class: Numeric

Inherits:
Object show all
Defined in:
lib/bacon.rb

Instance Method Summary collapse

Instance Method Details

#close?(to, delta) ⇒ Boolean

Returns:

  • (Boolean)


274
275
276
# File 'lib/bacon.rb', line 274

def close?(to, delta)
  (to.to_f - self).abs <= delta.to_f  rescue false
end