class Float def near_enough?(other, epsilon = Float::EPSILON) (self - other.to_f).abs < epsilon.to_f end end