lib/approximately_equals.rb in eymiha_math-0.1.0 vs lib/approximately_equals.rb in eymiha_math-0.1.1

- old
+ new

@@ -1,8 +1,16 @@ # Approminately equals returns true when values are close enough, within some -# distance epsilon above or below the given value. +# distance epsilon above or below the given value. Three methods and a class +# variable are added to the Numeric class. +# +# @@epsilon, and two class methods, Numeric.epsilon and Numeric.epsilon= get +# and set the maximum difference between two values for them to be +# approximately equal. +# +# approximately_equals? and the aliased operator =~ return true if two values +# are approximately equal. -# Adds the approximately equals operation to Numeric and its progeny. +# Behavor added to Numeric by eymiha_math. class Numeric # The initial default distance from a Numeric below which it is considered # to be approximately equal to a another Numeric. @@epsilon = 0.0000000001