Sha256: b3ff41fbcaa3af76f432f555c2db39fa64b57bf1d9dc0385143f66787b1b1e2d
Contents?: true
Size: 276 Bytes
Versions: 7
Compression:
Stored size: 276 Bytes
Contents
class Numeric # Determines if another number is approximately equal # within a given _n_th degree. Defaults to 100ths # if the degree is not specified. # # CREDIT: Trans def approx?(x, n=0.01) return(self == x) if n == 0 (self - x).abs <= n end end
Version data entries
7 entries across 7 versions & 2 rubygems